home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 …ember: Reference Library / Apple Developer Reference Library (December 1999) (Disk 1).iso / pc / technical documentation / develop / develop issue 23 / develop issue 23 code / projectdrag 1.1b8.sea / ProjectDrag 1.1b8 / Sources / ProjectDrag Sources / PDDialogs.c < prev    next >
MacBinary  |  1995-07-31  |  17.3 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Jul 31 22:29:18 1995, modified Mon Jul 31 22:29:18 1995, creator 'MPS ', type ASCII, 16925 bytes "PDDialogs.c" , at 0x429d 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 50 44 44 69 61 6c | 6f 67 73 2e 63 00 00 00 |..PDDial|ogs.c...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 42 1d 00 | 00 01 ac ac 43 41 fe ac |.....B..|....CA..|
|00000060| 43 41 fe 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |CA......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 5b 78 00 00 |........|....[x..|
|00000080| 2f 2a 20 50 44 44 69 61 | 6c 6f 67 73 2e 63 3a 20 |/* PDDia|logs.c: |
|00000090| 55 74 69 6c 69 74 79 20 | 64 69 61 6c 6f 67 73 20 |Utility |dialogs |
|000000a0| 72 6f 75 74 69 6e 65 73 | 20 66 6f 72 20 50 72 6f |routines| for Pro|
|000000b0| 6a 65 63 74 44 72 61 67 | 0d 20 2a 0d 20 2a 20 41 |jectDrag|. *. * A|
|000000c0| 20 73 65 74 20 6f 66 20 | 61 70 70 6c 65 74 73 20 | set of |applets |
|000000d0| 66 6f 72 20 64 72 61 67 | 20 61 6e 64 20 64 72 6f |for drag| and dro|
|000000e0| 70 20 73 6f 75 72 63 65 | 20 63 6f 6e 74 72 6f 6c |p source| control|
|000000f0| 20 62 79 20 54 69 6d 20 | 4d 61 72 6f 6e 65 79 2e | by Tim |Maroney.|
|00000100| 0d 20 2a 20 53 65 65 20 | 64 65 76 65 6c 6f 70 2c |. * See |develop,|
|00000110| 20 69 73 73 75 65 20 32 | 33 20 66 6f 72 20 64 65 | issue 2|3 for de|
|00000120| 74 61 69 6c 73 2e 0d 20 | 2a 0d 20 2a 20 42 75 69 |tails.. |*. * Bui|
|00000130| 6c 74 20 6f 6e 20 44 72 | 6f 70 53 68 65 6c 6c 20 |lt on Dr|opShell |
|00000140| 62 79 20 4c 65 6f 6e 61 | 72 64 20 52 6f 73 65 6e |by Leona|rd Rosen|
|00000150| 74 68 6f 6c 2c 20 53 74 | 65 70 68 61 6e 20 53 6f |thol, St|ephan So|
|00000160| 6d 6f 67 79 69 2c 20 61 | 6e 64 20 4d 61 72 73 68 |mogyi, a|nd Marsh|
|00000170| 61 6c 6c 20 43 6c 6f 77 | 2c 0d 20 2a 20 61 6e 64 |all Clow|,. * and|
|00000180| 20 75 73 69 6e 67 20 74 | 68 65 20 4d 6f 72 65 46 | using t|he MoreF|
|00000190| 69 6c 65 73 20 75 74 69 | 6c 69 74 69 65 73 20 62 |iles uti|lities b|
|000001a0| 79 20 4a 69 6d 20 4c 75 | 74 68 65 72 2e 0d 20 2a |y Jim Lu|ther.. *|
|000001b0| 0d 20 2a 20 54 68 69 73 | 20 73 6f 66 74 77 61 72 |. * This| softwar|
|000001c0| 65 20 69 73 20 66 72 65 | 65 2c 20 62 75 74 20 64 |e is fre|e, but d|
|000001d0| 6f 6e 27 74 20 6d 6f 64 | 69 66 79 20 61 6e 64 20 |on't mod|ify and |
|000001e0| 72 65 64 69 73 74 72 69 | 62 75 74 65 20 69 74 20 |redistri|bute it |
|000001f0| 77 69 74 68 6f 75 74 0d | 20 2a 20 63 68 61 6e 67 |without.| * chang|
|00000200| 69 6e 67 20 74 68 65 20 | 73 74 61 74 75 73 20 77 |ing the |status w|
|00000210| 69 6e 64 6f 77 20 74 6f | 20 69 6e 64 69 63 61 74 |indow to| indicat|
|00000220| 65 20 79 6f 75 72 20 6e | 61 6d 65 20 61 6e 64 20 |e your n|ame and |
|00000230| 79 6f 75 72 20 63 68 61 | 6e 67 65 73 21 0d 20 2a |your cha|nges!. *|
|00000240| 2f 0d 0d 23 69 6e 63 6c | 75 64 65 20 3c 44 69 61 |/..#incl|ude <Dia|
|00000250| 6c 6f 67 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |logs.h>.|#include|
|00000260| 20 3c 45 72 72 6f 72 73 | 2e 68 3e 0d 23 69 6e 63 | <Errors|.h>.#inc|
|00000270| 6c 75 64 65 20 3c 46 6f | 6e 74 73 2e 68 3e 0d 23 |lude <Fo|nts.h>.#|
|00000280| 69 6e 63 6c 75 64 65 20 | 3c 50 61 63 6b 61 67 65 |include |<Package|
|00000290| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 73 |s.h>.#in|clude <s|
|000002a0| 74 72 69 6e 67 2e 68 3e | 0d 0d 23 69 6e 63 6c 75 |tring.h>|..#inclu|
|000002b0| 64 65 20 22 50 44 44 69 | 61 6c 6f 67 73 2e 68 22 |de "PDDi|alogs.h"|
|000002c0| 0d 23 69 6e 63 6c 75 64 | 65 20 22 50 44 55 74 69 |.#includ|e "PDUti|
|000002d0| 6c 69 74 69 65 73 2e 68 | 22 0d 23 69 6e 63 6c 75 |lities.h|".#inclu|
|000002e0| 64 65 20 22 44 53 55 74 | 69 6c 73 2e 68 22 0d 23 |de "DSUt|ils.h".#|
|000002f0| 69 6e 63 6c 75 64 65 20 | 22 54 61 73 6b 73 41 6e |include |"TasksAn|
|00000300| 64 45 72 72 6f 72 73 2e | 68 22 0d 0d 0d 23 64 65 |dErrors.|h"...#de|
|00000310| 66 69 6e 65 20 6b 33 53 | 74 61 74 65 43 6f 6e 66 |fine k3S|tateConf|
|00000320| 69 72 6d 41 6c 65 72 74 | 20 32 30 32 0d 23 64 65 |irmAlert| 202.#de|
|00000330| 66 69 6e 65 20 6b 33 43 | 6f 6e 66 69 72 6d 59 65 |fine k3C|onfirmYe|
|00000340| 73 49 74 65 6d 20 31 0d | 23 64 65 66 69 6e 65 20 |sItem 1.|#define |
|00000350| 6b 33 43 6f 6e 66 69 72 | 6d 43 61 6e 63 65 6c 49 |k3Confir|mCancelI|
|00000360| 74 65 6d 20 32 0d 23 64 | 65 66 69 6e 65 20 6b 33 |tem 2.#d|efine k3|
|00000370| 43 6f 6e 66 69 72 6d 4e | 6f 49 74 65 6d 20 35 0d |ConfirmN|oItem 5.|
|00000380| 0d 23 64 65 66 69 6e 65 | 20 6b 55 73 65 72 53 65 |.#define| kUserSe|
|00000390| 74 74 69 6e 67 73 44 69 | 61 6c 6f 67 20 32 30 33 |ttingsDi|alog 203|
|000003a0| 0d 23 64 65 66 69 6e 65 | 20 6b 55 73 65 72 4e 61 |.#define| kUserNa|
|000003b0| 6d 65 49 74 65 6d 20 37 | 0d 23 64 65 66 69 6e 65 |meItem 7|.#define|
|000003c0| 20 6b 4e 69 63 6b 6e 61 | 6d 65 49 74 65 6d 20 38 | kNickna|meItem 8|
|000003d0| 0d 0d 23 64 65 66 69 6e | 65 09 6b 54 65 78 74 44 |..#defin|e.kTextD|
|000003e0| 69 73 70 6c 61 79 44 69 | 61 6c 6f 67 20 32 30 35 |isplayDi|alog 205|
|000003f0| 0d 23 64 65 66 69 6e 65 | 20 6b 4d 65 73 73 61 67 |.#define| kMessag|
|00000400| 65 49 74 65 6d 09 32 0d | 23 64 65 66 69 6e 65 09 |eItem.2.|#define.|
|00000410| 6b 45 64 69 74 54 65 78 | 74 49 74 65 6d 09 34 0d |kEditTex|tItem.4.|
|00000420| 23 64 65 66 69 6e 65 09 | 6b 53 63 72 6f 6c 6c 65 |#define.|kScrolle|
|00000430| 72 49 74 65 6d 09 35 0d | 0d 23 64 65 66 69 6e 65 |rItem.5.|.#define|
|00000440| 20 6b 32 53 74 61 74 65 | 43 6f 6e 66 69 72 6d 41 | k2State|ConfirmA|
|00000450| 6c 65 72 74 20 32 30 36 | 0d 23 64 65 66 69 6e 65 |lert 206|.#define|
|00000460| 20 6b 32 43 6f 6e 66 69 | 72 6d 59 65 73 49 74 65 | k2Confi|rmYesIte|
|00000470| 6d 20 31 0d 23 64 65 66 | 69 6e 65 20 6b 32 43 6f |m 1.#def|ine k2Co|
|00000480| 6e 66 69 72 6d 4e 6f 49 | 74 65 6d 20 32 0d 0d 23 |nfirmNoI|tem 2..#|
|00000490| 64 65 66 69 6e 65 09 6b | 4d 61 72 67 69 6e 09 09 |define.k|Margin..|
|000004a0| 09 34 0d 23 64 65 66 69 | 6e 65 09 6b 50 61 67 65 |.4.#defi|ne.kPage|
|000004b0| 4c 69 6e 65 73 09 09 31 | 36 0d 23 64 65 66 69 6e |Lines..1|6.#defin|
|000004c0| 65 09 6b 53 63 72 6f 6c | 6c 54 6f 54 6f 70 09 30 |e.kScrol|lToTop.0|
|000004d0| 0d 23 64 65 66 69 6e 65 | 09 6b 53 63 72 6f 6c 6c |.#define|.kScroll|
|000004e0| 54 6f 42 6f 74 74 6f 6d | 09 31 0d 23 64 65 66 69 |ToBottom|.1.#defi|
|000004f0| 6e 65 09 6b 43 68 65 63 | 6b 4f 6e 65 49 74 65 6d |ne.kChec|kOneItem|
|00000500| 09 35 0d 23 64 65 66 69 | 6e 65 09 6b 43 68 65 63 |.5.#defi|ne.kChec|
|00000510| 6b 54 77 6f 49 74 65 6d | 09 36 0d 0d 73 74 61 74 |kTwoItem|.6..stat|
|00000520| 69 63 20 42 6f 6f 6c 65 | 61 6e 20 70 55 73 65 72 |ic Boole|an pUser|
|00000530| 53 65 74 74 69 6e 67 73 | 49 6e 69 74 69 61 6c 69 |Settings|Initiali|
|00000540| 7a 65 64 20 3d 20 66 61 | 6c 73 65 3b 0d 73 74 61 |zed = fa|lse;.sta|
|00000550| 74 69 63 20 53 74 72 36 | 33 20 70 55 73 65 72 4e |tic Str6|3 pUserN|
|00000560| 61 6d 65 3b 0d 73 74 61 | 74 69 63 20 53 74 72 31 |ame;.sta|tic Str1|
|00000570| 35 20 70 4e 69 63 6b 6e | 61 6d 65 3b 0d 0d 0d 73 |5 pNickn|ame;...s|
|00000580| 74 61 74 69 63 20 54 45 | 48 61 6e 64 6c 65 20 70 |tatic TE|Handle p|
|00000590| 54 65 78 74 48 61 6e 64 | 6c 65 3b 0d 73 74 61 74 |TextHand|le;.stat|
|000005a0| 69 63 20 42 6f 6f 6c 65 | 61 6e 20 70 50 65 72 73 |ic Boole|an pPers|
|000005b0| 69 73 74 65 6e 74 46 6c | 61 67 3b 0d 0d 0d 70 61 |istentFl|ag;...pa|
|000005c0| 73 63 61 6c 20 42 6f 6f | 6c 65 61 6e 20 4d 79 46 |scal Boo|lean MyF|
|000005d0| 69 6c 74 65 72 50 72 6f | 63 28 44 69 61 6c 6f 67 |ilterPro|c(Dialog|
|000005e0| 50 74 72 20 74 68 65 44 | 69 61 6c 6f 67 2c 45 76 |Ptr theD|ialog,Ev|
|000005f0| 65 6e 74 52 65 63 6f 72 | 64 20 2a 65 76 2c 73 68 |entRecor|d *ev,sh|
|00000600| 6f 72 74 20 2a 69 74 65 | 6d 48 69 74 29 0d 7b 0d |ort *ite|mHit).{.|
|00000610| 09 72 65 74 75 72 6e 20 | 53 74 64 46 69 6c 74 65 |.return |StdFilte|
|00000620| 72 50 72 6f 63 28 74 68 | 65 44 69 61 6c 6f 67 2c |rProc(th|eDialog,|
|00000630| 20 65 76 2c 20 69 74 65 | 6d 48 69 74 29 3b 0d 7d | ev, ite|mHit);.}|
|00000640| 0d 0d 0d 4f 53 45 72 72 | 20 47 65 74 55 73 65 72 |...OSErr| GetUser|
|00000650| 53 65 74 74 69 6e 67 73 | 28 53 74 72 36 33 20 75 |Settings|(Str63 u|
|00000660| 73 65 72 4e 61 6d 65 2c | 20 53 74 72 31 35 20 75 |serName,| Str15 u|
|00000670| 73 65 72 4e 69 63 6b 6e | 61 6d 65 2c 20 42 6f 6f |serNickn|ame, Boo|
|00000680| 6c 65 61 6e 20 61 6c 77 | 61 79 73 41 73 6b 29 0d |lean alw|aysAsk).|
|00000690| 7b 0d 09 4f 53 45 72 72 | 20 65 72 72 20 3d 20 6e |{..OSErr| err = n|
|000006a0| 6f 45 72 72 3b 0d 09 46 | 53 53 70 65 63 20 75 73 |oErr;..F|SSpec us|
|000006b0| 65 72 53 65 74 74 69 6e | 67 73 46 69 6c 65 3b 0d |erSettin|gsFile;.|
|000006c0| 09 0d 09 75 73 65 72 4e | 61 6d 65 5b 30 5d 20 3d |...userN|ame[0] =|
|000006d0| 20 75 73 65 72 4e 69 63 | 6b 6e 61 6d 65 5b 30 5d | userNic|kname[0]|
|000006e0| 20 3d 20 30 3b 0d 09 0d | 09 69 66 20 28 21 61 6c | = 0;...|.if (!al|
|000006f0| 77 61 79 73 41 73 6b 20 | 26 26 20 70 55 73 65 72 |waysAsk |&& pUser|
|00000700| 53 65 74 74 69 6e 67 73 | 49 6e 69 74 69 61 6c 69 |Settings|Initiali|
|00000710| 7a 65 64 29 0d 09 7b 0d | 09 09 2f 2a 20 6a 75 73 |zed)..{.|../* jus|
|00000720| 74 20 72 65 74 75 72 6e | 20 74 68 65 20 73 74 61 |t return| the sta|
|00000730| 73 68 65 64 20 63 6f 70 | 79 20 2a 2f 0d 09 09 42 |shed cop|y */...B|
|00000740| 6c 6f 63 6b 4d 6f 76 65 | 28 70 55 73 65 72 4e 61 |lockMove|(pUserNa|
|00000750| 6d 65 2c 20 75 73 65 72 | 4e 61 6d 65 2c 20 70 55 |me, user|Name, pU|
|00000760| 73 65 72 4e 61 6d 65 5b | 30 5d 20 2b 20 31 29 3b |serName[|0] + 1);|
|00000770| 0d 09 09 42 6c 6f 63 6b | 4d 6f 76 65 28 70 4e 69 |...Block|Move(pNi|
|00000780| 63 6b 6e 61 6d 65 2c 20 | 75 73 65 72 4e 69 63 6b |ckname, |userNick|
|00000790| 6e 61 6d 65 2c 20 70 4e | 69 63 6b 6e 61 6d 65 5b |name, pN|ickname[|
|000007a0| 30 5d 20 2b 20 31 29 3b | 0d 09 09 72 65 74 75 72 |0] + 1);|...retur|
|000007b0| 6e 20 6e 6f 45 72 72 3b | 0d 09 7d 0d 09 0d 09 54 |n noErr;|..}....T|
|000007c0| 61 73 6b 53 74 61 72 74 | 28 6b 50 72 6f 6a 65 63 |askStart|(kProjec|
|000007d0| 74 44 72 61 67 53 74 72 | 69 6e 67 73 2c 20 6b 47 |tDragStr|ings, kG|
|000007e0| 65 74 74 69 6e 67 55 73 | 65 72 4e 61 6d 65 2c 20 |ettingUs|erName, |
|000007f0| 4e 55 4c 4c 2c 20 4e 55 | 4c 4c 2c 20 4e 55 4c 4c |NULL, NU|LL, NULL|
|00000800| 2c 20 4e 55 4c 4c 29 3b | 0d 09 0d 09 2f 2a 20 66 |, NULL);|..../* f|
|00000810| 69 6e 64 20 74 68 65 20 | 75 73 65 72 20 73 65 74 |ind the |user set|
|00000820| 74 69 6e 67 73 20 66 69 | 6c 65 20 2a 2f 0d 09 65 |tings fi|le */..e|
|00000830| 72 72 20 3d 20 46 69 6e | 64 50 72 65 66 65 72 65 |rr = Fin|dPrefere|
|00000840| 6e 63 65 73 46 6f 6c 64 | 65 72 28 26 75 73 65 72 |ncesFold|er(&user|
|00000850| 53 65 74 74 69 6e 67 73 | 46 69 6c 65 2e 76 52 65 |Settings|File.vRe|
|00000860| 66 4e 75 6d 2c 20 26 75 | 73 65 72 53 65 74 74 69 |fNum, &u|serSetti|
|00000870| 6e 67 73 46 69 6c 65 2e | 70 61 72 49 44 29 3b 0d |ngsFile.|parID);.|
|00000880| 09 69 66 20 28 65 72 72 | 20 21 3d 20 6e 6f 45 72 |.if (err| != noEr|
|00000890| 72 29 20 72 65 74 75 72 | 6e 20 52 61 69 73 65 45 |r) retur|n RaiseE|
|000008a0| 72 72 6f 72 4e 75 6d 62 | 65 72 28 65 72 72 29 3b |rrorNumb|er(err);|
|000008b0| 0d 09 47 65 74 49 6e 64 | 53 74 72 69 6e 67 28 75 |..GetInd|String(u|
|000008c0| 73 65 72 53 65 74 74 69 | 6e 67 73 46 69 6c 65 2e |serSetti|ngsFile.|
|000008d0| 6e 61 6d 65 2c 20 6b 50 | 72 6f 6a 65 63 74 44 72 |name, kP|rojectDr|
|000008e0| 61 67 53 74 72 69 6e 67 | 73 2c 20 6b 50 72 65 66 |agString|s, kPref|
|000008f0| 73 46 69 6c 65 4e 61 6d | 65 29 3b 0d 0d 09 7b 0d |sFileNam|e);...{.|
|00000900| 09 09 2f 2a 20 74 72 79 | 20 74 6f 20 67 65 74 20 |../* try| to get |
|00000910| 69 74 20 66 72 6f 6d 20 | 74 68 65 20 70 72 65 66 |it from |the pref|
|00000920| 65 72 65 6e 63 65 73 20 | 66 69 6c 65 20 2a 2f 0d |erences |file */.|
|00000930| 09 09 73 68 6f 72 74 20 | 72 65 66 4e 75 6d 3b 0d |..short |refNum;.|
|00000940| 09 09 6c 6f 6e 67 20 65 | 6f 66 3b 0d 09 09 0d 09 |..long e|of;.....|
|00000950| 09 65 72 72 20 3d 20 46 | 53 70 4f 70 65 6e 44 46 |.err = F|SpOpenDF|
|00000960| 28 26 75 73 65 72 53 65 | 74 74 69 6e 67 73 46 69 |(&userSe|ttingsFi|
|00000970| 6c 65 2c 20 66 73 52 64 | 50 65 72 6d 2c 20 26 72 |le, fsRd|Perm, &r|
|00000980| 65 66 4e 75 6d 29 3b 0d | 09 09 69 66 20 28 65 72 |efNum);.|..if (er|
|00000990| 72 20 3d 3d 20 6e 6f 45 | 72 72 29 0d 09 09 7b 0d |r == noE|rr)...{.|
|000009a0| 09 09 09 63 68 61 72 20 | 62 75 66 66 65 72 5b 37 |...char |buffer[7|
|000009b0| 32 5d 3b 0d 09 09 09 65 | 72 72 20 3d 20 47 65 74 |2];....e|rr = Get|
|000009c0| 45 4f 46 28 72 65 66 4e | 75 6d 2c 20 26 65 6f 66 |EOF(refN|um, &eof|
|000009d0| 29 3b 0d 09 09 09 69 66 | 20 28 65 72 72 20 3d 3d |);....if| (err ==|
|000009e0| 20 6e 6f 45 72 72 29 0d | 09 09 09 7b 0d 09 09 09 | noErr).|...{....|
|000009f0| 09 69 66 20 28 65 6f 66 | 20 3e 20 37 32 29 0d 09 |.if (eof| > 72)..|
|00000a00| 09 09 09 7b 0d 09 09 09 | 09 09 46 53 70 44 65 6c |...{....|..FSpDel|
|00000a10| 65 74 65 28 26 75 73 65 | 72 53 65 74 74 69 6e 67 |ete(&use|rSetting|
|00000a20| 73 46 69 6c 65 29 3b 09 | 2f 2a 20 62 61 64 20 70 |sFile);.|/* bad p|
|00000a30| 72 65 66 73 20 66 69 6c | 65 20 2a 2f 0d 09 09 09 |refs fil|e */....|
|00000a40| 09 09 65 72 72 20 3d 20 | 70 61 72 61 6d 45 72 72 |..err = |paramErr|
|00000a50| 3b 20 2f 2a 20 61 61 72 | 67 68 20 2a 2f 0d 09 09 |; /* aar|gh */...|
|00000a60| 09 09 7d 0d 09 09 09 09 | 65 6c 73 65 0d 09 09 09 |..}.....|else....|
|00000a70| 09 7b 0d 09 09 09 09 09 | 65 72 72 20 3d 20 46 53 |.{......|err = FS|
|00000a80| 52 65 61 64 28 72 65 66 | 4e 75 6d 2c 20 26 65 6f |Read(ref|Num, &eo|
|00000a90| 66 2c 20 62 75 66 66 65 | 72 29 3b 0d 09 09 09 09 |f, buffe|r);.....|
|00000aa0| 09 69 66 20 28 65 72 72 | 20 3d 3d 20 6e 6f 45 72 |.if (err| == noEr|
|00000ab0| 72 29 0d 09 09 09 09 09 | 7b 0d 09 09 09 09 09 09 |r)......|{.......|
|00000ac0| 2f 2a 20 6e 6f 77 20 70 | 61 72 73 65 20 69 74 3b |/* now p|arse it;|
|00000ad0| 20 43 52 2d 73 65 70 61 | 72 61 74 65 64 20 2a 2f | CR-sepa|rated */|
|00000ae0| 0d 09 09 09 09 09 09 53 | 74 72 69 6e 67 50 74 72 |.......S|tringPtr|
|00000af0| 20 73 72 63 20 3d 20 62 | 75 66 66 65 72 3b 0d 09 | src = b|uffer;..|
|00000b00| 09 09 09 09 09 53 74 72 | 69 6e 67 50 74 72 20 64 |.....Str|ingPtr d|
|00000b10| 73 74 20 3d 20 75 73 65 | 72 4e 61 6d 65 20 2b 20 |st = use|rName + |
|00000b20| 31 3b 0d 09 09 09 09 09 | 09 73 68 6f 72 74 20 6c |1;......|.short l|
|00000b30| 65 6e 20 3d 20 30 3b 0d | 09 09 09 09 09 09 75 73 |en = 0;.|......us|
|00000b40| 65 72 4e 61 6d 65 5b 30 | 5d 20 3d 20 30 3b 0d 09 |erName[0|] = 0;..|
|00000b50| 09 09 09 09 09 77 68 69 | 6c 65 20 28 28 6c 65 6e |.....whi|le ((len|
|00000b60| 20 3c 20 65 6f 66 29 20 | 26 26 20 28 6c 65 6e 20 | < eof) |&& (len |
|00000b70| 3c 3d 20 36 33 29 20 26 | 26 20 28 2a 73 72 63 20 |<= 63) &|& (*src |
|00000b80| 21 3d 20 27 5c 6e 27 29 | 29 0d 09 09 09 09 09 09 |!= '\n')|).......|
|00000b90| 7b 0d 09 09 09 09 09 09 | 09 2a 64 73 74 2b 2b 20 |{.......|.*dst++ |
|00000ba0| 3d 20 2a 73 72 63 2b 2b | 3b 0d 09 09 09 09 09 09 |= *src++|;.......|
|00000bb0| 09 75 73 65 72 4e 61 6d | 65 5b 30 5d 2b 2b 3b 0d |.userNam|e[0]++;.|
|00000bc0| 09 09 09 09 09 09 09 6c | 65 6e 2b 2b 3b 0d 09 09 |.......l|en++;...|
|00000bd0| 09 09 09 09 7d 0d 09 09 | 09 09 09 09 65 6f 66 20 |....}...|....eof |
|00000be0| 2d 3d 20 28 6c 65 6e 20 | 2b 20 31 29 3b 0d 09 09 |-= (len |+ 1);...|
|00000bf0| 09 09 09 09 75 73 65 72 | 4e 69 63 6b 6e 61 6d 65 |....user|Nickname|
|00000c00| 5b 30 5d 20 3d 20 30 3b | 0d 09 09 09 09 09 09 6c |[0] = 0;|.......l|
|00000c10| 65 6e 20 3d 20 30 3b 0d | 09 09 09 09 09 09 73 72 |en = 0;.|......sr|
|00000c20| 63 2b 2b 3b 0d 09 09 09 | 09 09 09 64 73 74 20 3d |c++;....|...dst =|
|00000c30| 20 75 73 65 72 4e 69 63 | 6b 6e 61 6d 65 20 2b 20 | userNic|kname + |
|00000c40| 31 3b 0d 09 09 09 09 09 | 09 77 68 69 6c 65 20 28 |1;......|.while (|
|00000c50| 28 6c 65 6e 20 3c 20 65 | 6f 66 29 20 26 26 20 28 |(len < e|of) && (|
|00000c60| 6c 65 6e 20 3c 3d 20 37 | 29 20 26 26 20 28 2a 73 |len <= 7|) && (*s|
|00000c70| 72 63 20 21 3d 20 27 5c | 6e 27 29 29 0d 09 09 09 |rc != '\|n'))....|
|00000c80| 09 09 09 7b 0d 09 09 09 | 09 09 09 09 2a 64 73 74 |...{....|....*dst|
|00000c90| 2b 2b 20 3d 20 2a 73 72 | 63 2b 2b 3b 0d 09 09 09 |++ = *sr|c++;....|
|00000ca0| 09 09 09 09 75 73 65 72 | 4e 69 63 6b 6e 61 6d 65 |....user|Nickname|
|00000cb0| 5b 30 5d 2b 2b 3b 0d 09 | 09 09 09 09 09 7d 0d 09 |[0]++;..|.....}..|
|00000cc0| 09 09 09 09 09 0d 09 09 | 09 09 09 09 42 6c 6f 63 |........|....Bloc|
|00000cd0| 6b 4d 6f 76 65 28 75 73 | 65 72 4e 61 6d 65 2c 20 |kMove(us|erName, |
|00000ce0| 70 55 73 65 72 4e 61 6d | 65 2c 20 75 73 65 72 4e |pUserNam|e, userN|
|00000cf0| 61 6d 65 5b 30 5d 20 2b | 20 31 29 3b 0d 09 09 09 |ame[0] +| 1);....|
|00000d00| 09 09 09 42 6c 6f 63 6b | 4d 6f 76 65 28 75 73 65 |...Block|Move(use|
|00000d10| 72 4e 69 63 6b 6e 61 6d | 65 2c 20 70 4e 69 63 6b |rNicknam|e, pNick|
|00000d20| 6e 61 6d 65 2c 20 75 73 | 65 72 4e 69 63 6b 6e 61 |name, us|erNickna|
|00000d30| 6d 65 5b 30 5d 20 2b 20 | 31 29 3b 0d 09 09 09 09 |me[0] + |1);.....|
|00000d40| 09 09 70 55 73 65 72 53 | 65 74 74 69 6e 67 73 49 |..pUserS|ettingsI|
|00000d50| 6e 69 74 69 61 6c 69 7a | 65 64 20 3d 20 74 72 75 |nitializ|ed = tru|
|00000d60| 65 3b 0d 09 09 09 09 09 | 7d 0d 09 09 09 09 09 46 |e;......|}......F|
|00000d70| 53 43 6c 6f 73 65 28 72 | 65 66 4e 75 6d 29 3b 0d |SClose(r|efNum);.|
|00000d80| 09 09 09 09 09 69 66 20 | 28 65 72 72 20 21 3d 20 |.....if |(err != |
|00000d90| 6e 6f 45 72 72 29 0d 09 | 09 09 09 09 09 46 53 70 |noErr)..|.....FSp|
|00000da0| 44 65 6c 65 74 65 28 26 | 75 73 65 72 53 65 74 74 |Delete(&|userSett|
|00000db0| 69 6e 67 73 46 69 6c 65 | 29 3b 09 2f 2a 20 62 61 |ingsFile|);./* ba|
|00000dc0| 64 20 70 72 65 66 73 20 | 66 69 6c 65 20 2a 2f 0d |d prefs |file */.|
|00000dd0| 09 09 09 09 09 65 6c 73 | 65 20 69 66 20 28 21 61 |.....els|e if (!a|
|00000de0| 6c 77 61 79 73 41 73 6b | 29 0d 09 09 09 09 09 7b |lwaysAsk|)......{|
|00000df0| 0d 09 09 09 09 09 09 54 | 61 73 6b 44 6f 6e 65 28 |.......T|askDone(|
|00000e00| 29 3b 0d 09 09 09 09 09 | 09 72 65 74 75 72 6e 20 |);......|.return |
|00000e10| 6e 6f 45 72 72 3b 0d 09 | 09 09 09 09 7d 0d 09 09 |noErr;..|....}...|
|00000e20| 09 09 7d 0d 09 09 09 7d | 0d 09 09 7d 0d 09 09 65 |..}....}|...}...e|
|00000e30| 72 72 20 3d 20 6e 6f 45 | 72 72 3b 20 2f 2a 20 72 |rr = noE|rr; /* r|
|00000e40| 65 61 64 79 20 74 6f 20 | 74 72 79 20 74 68 65 20 |eady to |try the |
|00000e50| 6e 65 78 74 20 61 70 70 | 72 6f 61 63 68 20 2a 2f |next app|roach */|
|00000e60| 0d 09 7d 0d 09 0d 09 7b | 0d 09 09 44 69 61 6c 6f |..}....{|...Dialo|
|00000e70| 67 50 74 72 20 64 69 61 | 6c 6f 67 3b 0d 09 09 42 |gPtr dia|log;...B|
|00000e80| 6f 6f 6c 65 61 6e 20 64 | 6f 6e 65 20 3d 20 66 61 |oolean d|one = fa|
|00000e90| 6c 73 65 3b 0d 09 09 52 | 65 63 74 20 72 3b 0d 09 |lse;...R|ect r;..|
|00000ea0| 09 48 61 6e 64 6c 65 20 | 68 3b 0d 09 09 73 68 6f |.Handle |h;...sho|
|00000eb0| 72 74 20 74 79 70 65 3b | 0d 09 09 0d 09 09 64 69 |rt type;|......di|
|00000ec0| 61 6c 6f 67 20 3d 20 47 | 65 74 4e 65 77 44 69 61 |alog = G|etNewDia|
|00000ed0| 6c 6f 67 28 6b 55 73 65 | 72 53 65 74 74 69 6e 67 |log(kUse|rSetting|
|00000ee0| 73 44 69 61 6c 6f 67 2c | 20 4e 55 4c 4c 2c 20 28 |sDialog,| NULL, (|
|00000ef0| 57 69 6e 64 6f 77 50 74 | 72 29 2d 31 29 3b 0d 09 |WindowPt|r)-1);..|
|00000f00| 09 69 66 20 28 64 69 61 | 6c 6f 67 20 3d 3d 20 4e |.if (dia|log == N|
|00000f10| 55 4c 4c 29 20 72 65 74 | 75 72 6e 20 52 61 69 73 |ULL) ret|urn Rais|
|00000f20| 65 45 72 72 6f 72 4e 75 | 6d 62 65 72 28 72 65 73 |eErrorNu|mber(res|
|00000f30| 4e 6f 74 46 6f 75 6e 64 | 29 3b 0d 09 09 53 65 74 |NotFound|);...Set|
|00000f40| 44 69 61 6c 6f 67 44 65 | 66 61 75 6c 74 49 74 65 |DialogDe|faultIte|
|00000f50| 6d 28 64 69 61 6c 6f 67 | 2c 20 6f 6b 29 3b 0d 09 |m(dialog|, ok);..|
|00000f60| 09 53 65 74 44 69 61 6c | 6f 67 43 61 6e 63 65 6c |.SetDial|ogCancel|
|00000f70| 49 74 65 6d 28 64 69 61 | 6c 6f 67 2c 20 63 61 6e |Item(dia|log, can|
|00000f80| 63 65 6c 29 3b 0d 09 09 | 53 65 74 44 69 61 6c 6f |cel);...|SetDialo|
|00000f90| 67 54 72 61 63 6b 73 43 | 75 72 73 6f 72 28 64 69 |gTracksC|ursor(di|
|00000fa0| 61 6c 6f 67 2c 20 74 72 | 75 65 29 3b 0d 09 09 69 |alog, tr|ue);...i|
|00000fb0| 66 20 28 70 55 73 65 72 | 53 65 74 74 69 6e 67 73 |f (pUser|Settings|
|00000fc0| 49 6e 69 74 69 61 6c 69 | 7a 65 64 29 0d 09 09 7b |Initiali|zed)...{|
|00000fd0| 0d 09 09 09 47 65 74 44 | 49 74 65 6d 28 64 69 61 |....GetD|Item(dia|
|00000fe0| 6c 6f 67 2c 20 6b 55 73 | 65 72 4e 61 6d 65 49 74 |log, kUs|erNameIt|
|00000ff0| 65 6d 2c 20 26 74 79 70 | 65 2c 20 26 68 2c 20 26 |em, &typ|e, &h, &|
|00001000| 72 29 3b 0d 09 09 09 53 | 65 74 49 54 65 78 74 28 |r);....S|etIText(|
|00001010| 68 2c 20 70 55 73 65 72 | 4e 61 6d 65 29 3b 0d 09 |h, pUser|Name);..|
|00001020| 09 09 47 65 74 44 49 74 | 65 6d 28 64 69 61 6c 6f |..GetDIt|em(dialo|
|00001030| 67 2c 20 6b 4e 69 63 6b | 6e 61 6d 65 49 74 65 6d |g, kNick|nameItem|
|00001040| 2c 20 26 74 79 70 65 2c | 20 26 68 2c 20 26 72 29 |, &type,| &h, &r)|
|00001050| 3b 0d 09 09 09 53 65 74 | 49 54 65 78 74 28 68 2c |;....Set|IText(h,|
|00001060| 20 70 4e 69 63 6b 6e 61 | 6d 65 29 3b 0d 09 09 7d | pNickna|me);...}|
|00001070| 0d 09 09 53 65 6c 65 63 | 74 44 69 61 6c 6f 67 49 |...Selec|tDialogI|
|00001080| 74 65 6d 54 65 78 74 28 | 64 69 61 6c 6f 67 2c 20 |temText(|dialog, |
|00001090| 6b 55 73 65 72 4e 61 6d | 65 49 74 65 6d 2c 20 30 |kUserNam|eItem, 0|
|000010a0| 2c 20 33 32 37 36 37 29 | 3b 0d 09 09 77 68 69 6c |, 32767)|;...whil|
|000010b0| 65 20 28 21 64 6f 6e 65 | 29 0d 09 09 7b 0d 09 09 |e (!done|)...{...|
|000010c0| 09 73 68 6f 72 74 20 69 | 74 65 6d 48 69 74 3b 0d |.short i|temHit;.|
|000010d0| 09 09 09 53 74 72 32 35 | 35 20 73 3b 0d 09 09 09 |...Str25|5 s;....|
|000010e0| 42 6f 6f 6c 65 61 6e 20 | 65 6e 61 62 6c 65 4f 4b |Boolean |enableOK|
|000010f0| 20 3d 20 66 61 6c 73 65 | 3b 0d 09 09 09 43 6f 6e | = false|;....Con|
|00001100| 74 72 6f 6c 48 61 6e 64 | 6c 65 20 63 68 3b 0d 09 |trolHand|le ch;..|
|00001110| 09 09 0d 09 09 09 2f 2a | 20 66 69 78 20 74 68 65 |....../*| fix the|
|00001120| 20 4f 4b 20 62 75 74 74 | 6f 6e 20 2a 2f 0d 09 09 | OK butt|on */...|
|00001130| 09 47 65 74 44 49 74 65 | 6d 28 64 69 61 6c 6f 67 |.GetDIte|m(dialog|
|00001140| 2c 20 6b 55 73 65 72 4e | 61 6d 65 49 74 65 6d 2c |, kUserN|ameItem,|
|00001150| 20 26 74 79 70 65 2c 20 | 26 68 2c 20 26 72 29 3b | &type, |&h, &r);|
|00001160| 0d 09 09 09 47 65 74 49 | 54 65 78 74 28 68 2c 20 |....GetI|Text(h, |
|00001170| 73 29 3b 0d 09 09 09 69 | 66 20 28 73 5b 30 5d 20 |s);....i|f (s[0] |
|00001180| 3e 20 30 29 0d 09 09 09 | 7b 0d 09 09 09 09 65 6e |> 0)....|{.....en|
|00001190| 61 62 6c 65 4f 4b 20 3d | 20 74 72 75 65 3b 0d 09 |ableOK =| true;..|
|000011a0| 09 09 7d 0d 09 09 09 65 | 6c 73 65 0d 09 09 09 7b |..}....e|lse....{|
|000011b0| 0d 09 09 09 09 47 65 74 | 44 49 74 65 6d 28 64 69 |.....Get|DItem(di|
|000011c0| 61 6c 6f 67 2c 20 6b 4e | 69 63 6b 6e 61 6d 65 49 |alog, kN|icknameI|
|000011d0| 74 65 6d 2c 20 26 74 79 | 70 65 2c 20 26 68 2c 20 |tem, &ty|pe, &h, |
|000011e0| 26 72 29 3b 0d 09 09 09 | 09 47 65 74 49 54 65 78 |&r);....|.GetITex|
|000011f0| 74 28 68 2c 20 73 29 3b | 0d 09 09 09 09 69 66 20 |t(h, s);|.....if |
|00001200| 28 73 5b 30 5d 20 3e 20 | 30 29 20 65 6e 61 62 6c |(s[0] > |0) enabl|
|00001210| 65 4f 4b 20 3d 20 74 72 | 75 65 3b 0d 09 09 09 7d |eOK = tr|ue;....}|
|00001220| 0d 09 09 09 47 65 74 44 | 49 74 65 6d 28 64 69 61 |....GetD|Item(dia|
|00001230| 6c 6f 67 2c 20 6f 6b 2c | 20 26 74 79 70 65 2c 20 |log, ok,| &type, |
|00001240| 26 68 2c 20 26 72 29 3b | 0d 09 09 09 63 68 20 3d |&h, &r);|....ch =|
|00001250| 20 28 43 6f 6e 74 72 6f | 6c 48 61 6e 64 6c 65 29 | (Contro|lHandle)|
|00001260| 68 3b 0d 09 09 09 48 69 | 6c 69 74 65 43 6f 6e 74 |h;....Hi|liteCont|
|00001270| 72 6f 6c 28 63 68 2c 20 | 65 6e 61 62 6c 65 4f 4b |rol(ch, |enableOK|
|00001280| 20 3f 20 30 20 3a 20 32 | 35 35 29 3b 0d 09 09 09 | ? 0 : 2|55);....|
|00001290| 0d 09 09 09 53 68 6f 77 | 57 69 6e 64 6f 77 28 64 |....Show|Window(d|
|000012a0| 69 61 6c 6f 67 29 3b 0d | 09 09 09 4d 6f 64 61 6c |ialog);.|...Modal|
|000012b0| 44 69 61 6c 6f 67 28 4d | 79 46 69 6c 74 65 72 50 |Dialog(M|yFilterP|
|000012c0| 72 6f 63 2c 20 26 69 74 | 65 6d 48 69 74 29 3b 0d |roc, &it|emHit);.|
|000012d0| 09 09 09 73 77 69 74 63 | 68 20 28 69 74 65 6d 48 |...switc|h (itemH|
|000012e0| 69 74 29 0d 09 09 09 7b | 0d 09 09 09 63 61 73 65 |it)....{|....case|
|000012f0| 20 6f 6b 3a 0d 09 09 09 | 09 47 65 74 44 49 74 65 | ok:....|.GetDIte|
|00001300| 6d 28 64 69 61 6c 6f 67 | 2c 20 6b 55 73 65 72 4e |m(dialog|, kUserN|
|00001310| 61 6d 65 49 74 65 6d 2c | 20 26 74 79 70 65 2c 20 |ameItem,| &type, |
|00001320| 26 68 2c 20 26 72 29 3b | 0d 09 09 09 09 47 65 74 |&h, &r);|.....Get|
|00001330| 49 54 65 78 74 28 68 2c | 20 73 29 3b 0d 09 09 09 |IText(h,| s);....|
|00001340| 09 69 66 20 28 73 5b 30 | 5d 20 3e 20 36 33 29 20 |.if (s[0|] > 63) |
|00001350| 73 5b 30 5d 20 3d 20 36 | 33 3b 0d 09 09 09 09 42 |s[0] = 6|3;.....B|
|00001360| 6c 6f 63 6b 4d 6f 76 65 | 28 73 2c 20 75 73 65 72 |lockMove|(s, user|
|00001370| 4e 61 6d 65 2c 20 73 5b | 30 5d 20 2b 20 31 29 3b |Name, s[|0] + 1);|
|00001380| 0d 09 09 09 09 0d 09 09 | 09 09 47 65 74 44 49 74 |........|..GetDIt|
|00001390| 65 6d 28 64 69 61 6c 6f | 67 2c 20 6b 4e 69 63 6b |em(dialo|g, kNick|
|000013a0| 6e 61 6d 65 49 74 65 6d | 2c 20 26 74 79 70 65 2c |nameItem|, &type,|
|000013b0| 20 26 68 2c 20 26 72 29 | 3b 0d 09 09 09 09 47 65 | &h, &r)|;.....Ge|
|000013c0| 74 49 54 65 78 74 28 68 | 2c 20 73 29 3b 0d 09 09 |tIText(h|, s);...|
|000013d0| 09 09 69 66 20 28 73 5b | 30 5d 20 3e 20 37 29 20 |..if (s[|0] > 7) |
|000013e0| 73 5b 30 5d 20 3d 20 37 | 3b 0d 09 09 09 09 42 6c |s[0] = 7|;.....Bl|
|000013f0| 6f 63 6b 4d 6f 76 65 28 | 73 2c 20 75 73 65 72 4e |ockMove(|s, userN|
|00001400| 69 63 6b 6e 61 6d 65 2c | 20 73 5b 30 5d 20 2b 20 |ickname,| s[0] + |
|00001410| 31 29 3b 0d 09 09 09 09 | 0d 09 09 09 09 42 6c 6f |1);.....|.....Blo|
|00001420| 63 6b 4d 6f 76 65 28 75 | 73 65 72 4e 61 6d 65 2c |ckMove(u|serName,|
|00001430| 20 70 55 73 65 72 4e 61 | 6d 65 2c 20 75 73 65 72 | pUserNa|me, user|
|00001440| 4e 61 6d 65 5b 30 5d 20 | 2b 20 31 29 3b 0d 09 09 |Name[0] |+ 1);...|
|00001450| 09 09 42 6c 6f 63 6b 4d | 6f 76 65 28 75 73 65 72 |..BlockM|ove(user|
|00001460| 4e 69 63 6b 6e 61 6d 65 | 2c 20 70 4e 69 63 6b 6e |Nickname|, pNickn|
|00001470| 61 6d 65 2c 20 75 73 65 | 72 4e 69 63 6b 6e 61 6d |ame, use|rNicknam|
|00001480| 65 5b 30 5d 20 2b 20 31 | 29 3b 0d 09 09 09 09 0d |e[0] + 1|);......|
|00001490| 09 09 09 09 2f 2a 20 77 | 72 69 74 65 20 74 68 65 |..../* w|rite the|
|000014a0| 20 70 72 65 66 65 72 65 | 6e 63 65 73 20 66 69 6c | prefere|nces fil|
|000014b0| 65 20 2a 2f 0d 09 09 09 | 09 65 72 72 20 3d 20 46 |e */....|.err = F|
|000014c0| 53 70 43 72 65 61 74 65 | 28 26 75 73 65 72 53 65 |SpCreate|(&userSe|
|000014d0| 74 74 69 6e 67 73 46 69 | 6c 65 2c 20 27 74 74 78 |ttingsFi|le, 'ttx|
|000014e0| 74 27 2c 20 27 54 45 58 | 54 27 2c 20 73 6d 53 79 |t', 'TEX|T', smSy|
|000014f0| 73 74 65 6d 53 63 72 69 | 70 74 29 3b 0d 09 09 09 |stemScri|pt);....|
|00001500| 09 69 66 20 28 65 72 72 | 20 3d 3d 20 6e 6f 45 72 |.if (err| == noEr|
|00001510| 72 20 7c 7c 20 65 72 72 | 20 3d 3d 20 64 75 70 46 |r || err| == dupF|
|00001520| 4e 45 72 72 29 0d 09 09 | 09 09 7b 0d 09 09 09 09 |NErr)...|..{.....|
|00001530| 09 73 68 6f 72 74 20 72 | 65 66 4e 75 6d 3b 0d 09 |.short r|efNum;..|
|00001540| 09 09 09 09 65 72 72 20 | 3d 20 46 53 70 4f 70 65 |....err |= FSpOpe|
|00001550| 6e 44 46 28 26 75 73 65 | 72 53 65 74 74 69 6e 67 |nDF(&use|rSetting|
|00001560| 73 46 69 6c 65 2c 20 66 | 73 57 72 50 65 72 6d 2c |sFile, f|sWrPerm,|
|00001570| 20 26 72 65 66 4e 75 6d | 29 3b 0d 09 09 09 09 09 | &refNum|);......|
|00001580| 69 66 20 28 65 72 72 20 | 3d 3d 20 6e 6f 45 72 72 |if (err |== noErr|
|00001590| 29 0d 09 09 09 09 09 7b | 0d 09 09 09 09 09 09 63 |)......{|.......c|
|000015a0| 68 61 72 20 62 75 66 66 | 65 72 5b 37 32 5d 3b 0d |har buff|er[72];.|
|000015b0| 09 09 09 09 09 09 6c 6f | 6e 67 20 63 6f 75 6e 74 |......lo|ng count|
|000015c0| 20 3d 20 75 73 65 72 4e | 61 6d 65 5b 30 5d 20 2b | = userN|ame[0] +|
|000015d0| 20 75 73 65 72 4e 69 63 | 6b 6e 61 6d 65 5b 30 5d | userNic|kname[0]|
|000015e0| 20 2b 20 32 3b 0d 09 09 | 09 09 09 09 0d 09 09 09 | + 2;...|........|
|000015f0| 09 09 09 42 6c 6f 63 6b | 4d 6f 76 65 28 75 73 65 |...Block|Move(use|
|00001600| 72 4e 61 6d 65 20 2b 20 | 31 2c 20 62 75 66 66 65 |rName + |1, buffe|
|00001610| 72 2c 20 75 73 65 72 4e | 61 6d 65 5b 30 5d 20 2b |r, userN|ame[0] +|
|00001620| 20 31 29 3b 0d 09 09 09 | 09 09 09 62 75 66 66 65 | 1);....|...buffe|
|00001630| 72 5b 75 73 65 72 4e 61 | 6d 65 5b 30 5d 5d 20 3d |r[userNa|me[0]] =|
|00001640| 20 27 5c 6e 27 3b 0d 09 | 09 09 09 09 09 42 6c 6f | '\n';..|.....Blo|
|00001650| 63 6b 4d 6f 76 65 28 75 | 73 65 72 4e 69 63 6b 6e |ckMove(u|serNickn|
|00001660| 61 6d 65 20 2b 20 31 2c | 20 62 75 66 66 65 72 20 |ame + 1,| buffer |
|00001670| 2b 20 75 73 65 72 4e 61 | 6d 65 5b 30 5d 20 2b 20 |+ userNa|me[0] + |
|00001680| 31 2c 20 75 73 65 72 4e | 69 63 6b 6e 61 6d 65 5b |1, userN|ickname[|
|00001690| 30 5d 20 2b 20 31 29 3b | 0d 09 09 09 09 09 09 62 |0] + 1);|.......b|
|000016a0| 75 66 66 65 72 5b 63 6f | 75 6e 74 20 2d 20 31 5d |uffer[co|unt - 1]|
|000016b0| 20 3d 20 27 5c 6e 27 3b | 0d 09 09 09 09 09 09 65 | = '\n';|.......e|
|000016c0| 72 72 20 3d 20 46 53 57 | 72 69 74 65 28 72 65 66 |rr = FSW|rite(ref|
|000016d0| 4e 75 6d 2c 20 26 63 6f | 75 6e 74 2c 20 62 75 66 |Num, &co|unt, buf|
|000016e0| 66 65 72 29 3b 0d 09 09 | 09 09 09 09 46 53 43 6c |fer);...|....FSCl|
|000016f0| 6f 73 65 28 72 65 66 4e | 75 6d 29 3b 0d 09 09 09 |ose(refN|um);....|
|00001700| 09 09 09 69 66 20 28 65 | 72 72 20 21 3d 20 6e 6f |...if (e|rr != no|
|00001710| 45 72 72 29 0d 09 09 09 | 09 09 09 09 46 53 70 44 |Err)....|....FSpD|
|00001720| 65 6c 65 74 65 28 26 75 | 73 65 72 53 65 74 74 69 |elete(&u|serSetti|
|00001730| 6e 67 73 46 69 6c 65 29 | 3b 0d 09 09 09 09 09 7d |ngsFile)|;......}|
|00001740| 0d 09 09 09 09 7d 0d 09 | 09 09 09 69 66 20 28 65 |.....}..|...if (e|
|00001750| 72 72 20 21 3d 20 6e 6f | 45 72 72 29 0d 09 09 09 |rr != no|Err)....|
|00001760| 09 7b 0d 09 09 09 09 09 | 2f 2a 20 61 6c 65 72 74 |.{......|/* alert|
|00001770| 20 74 68 65 20 75 73 65 | 72 20 74 68 61 74 20 70 | the use|r that p|
|00001780| 72 65 66 73 20 63 6f 75 | 6c 64 6e 27 74 20 62 65 |refs cou|ldn't be|
|00001790| 20 77 72 69 74 74 65 6e | 3b 20 62 75 74 20 63 6f | written|; but co|
|000017a0| 6e 74 69 6e 75 65 21 20 | 2a 2f 0d 09 09 09 09 09 |ntinue! |*/......|
|000017b0| 45 72 72 6f 72 41 6c 65 | 72 74 28 6b 50 72 6f 6a |ErrorAle|rt(kProj|
|000017c0| 65 63 74 44 72 61 67 53 | 74 72 69 6e 67 73 2c 20 |ectDragS|trings, |
|000017d0| 6b 43 61 6e 74 57 72 69 | 74 65 50 72 65 66 73 2c |kCantWri|tePrefs,|
|000017e0| 20 65 72 72 29 3b 0d 09 | 09 09 09 09 65 72 72 20 | err);..|....err |
|000017f0| 3d 20 6e 6f 45 72 72 3b | 0d 09 09 09 09 7d 0d 09 |= noErr;|.....}..|
|00001800| 09 09 09 0d 09 09 09 09 | 70 55 73 65 72 53 65 74 |........|pUserSet|
|00001810| 74 69 6e 67 73 49 6e 69 | 74 69 61 6c 69 7a 65 64 |tingsIni|tialized|
|00001820| 20 3d 20 74 72 75 65 3b | 0d 09 09 09 09 64 6f 6e | = true;|.....don|
|00001830| 65 20 3d 20 74 72 75 65 | 3b 0d 09 09 09 09 54 61 |e = true|;.....Ta|
|00001840| 73 6b 44 6f 6e 65 28 29 | 3b 0d 09 09 09 09 62 72 |skDone()|;.....br|
|00001850| 65 61 6b 3b 0d 09 09 09 | 09 0d 09 09 09 63 61 73 |eak;....|.....cas|
|00001860| 65 20 63 61 6e 63 65 6c | 3a 0d 09 09 09 09 65 72 |e cancel|:.....er|
|00001870| 72 20 3d 20 52 61 69 73 | 65 45 72 72 6f 72 4e 75 |r = Rais|eErrorNu|
|00001880| 6d 62 65 72 28 75 73 65 | 72 43 61 6e 63 65 6c 65 |mber(use|rCancele|
|00001890| 64 45 72 72 29 3b 0d 09 | 09 09 09 64 6f 6e 65 20 |dErr);..|...done |
|000018a0| 3d 20 74 72 75 65 3b 0d | 09 09 09 09 62 72 65 61 |= true;.|....brea|
|000018b0| 6b 3b 0d 09 09 09 7d 0d | 09 09 7d 0d 09 09 44 69 |k;....}.|..}...Di|
|000018c0| 73 70 6f 73 65 44 69 61 | 6c 6f 67 28 64 69 61 6c |sposeDia|log(dial|
|000018d0| 6f 67 29 3b 0d 09 7d 0d | 09 0d 09 72 65 74 75 72 |og);..}.|...retur|
|000018e0| 6e 20 65 72 72 3b 0d 7d | 0d 0d 0d 73 74 61 74 69 |n err;.}|...stati|
|000018f0| 63 20 70 61 73 63 61 6c | 20 42 6f 6f 6c 65 61 6e |c pascal| Boolean|
|00001900| 20 43 6f 6e 66 69 72 6d | 41 6c 65 72 74 46 69 6c | Confirm|AlertFil|
|00001910| 74 65 72 28 44 69 61 6c | 6f 67 50 74 72 20 74 68 |ter(Dial|ogPtr th|
|00001920| 65 44 69 61 6c 6f 67 2c | 20 45 76 65 6e 74 52 65 |eDialog,| EventRe|
|00001930| 63 6f 72 64 20 2a 74 68 | 65 45 76 65 6e 74 2c 0d |cord *th|eEvent,.|
|00001940| 09 09 09 09 09 09 09 09 | 09 09 09 73 68 6f 72 74 |........|...short|
|00001950| 20 2a 69 74 65 6d 48 69 | 74 29 0d 7b 0d 23 70 72 | *itemHi|t).{.#pr|
|00001960| 61 67 6d 61 20 75 6e 75 | 73 65 64 20 28 69 74 65 |agma unu|sed (ite|
|00001970| 6d 48 69 74 29 0d 0d 09 | 53 65 74 44 69 61 6c 6f |mHit)...|SetDialo|
|00001980| 67 44 65 66 61 75 6c 74 | 49 74 65 6d 28 74 68 65 |gDefault|Item(the|
|00001990| 44 69 61 6c 6f 67 2c 20 | 6f 6b 29 3b 0d 09 53 65 |Dialog, |ok);..Se|
|000019a0| 74 44 69 61 6c 6f 67 43 | 61 6e 63 65 6c 49 74 65 |tDialogC|ancelIte|
|000019b0| 6d 28 74 68 65 44 69 61 | 6c 6f 67 2c 20 63 61 6e |m(theDia|log, can|
|000019c0| 63 65 6c 29 3b 0d 09 0d | 09 2f 2a 20 69 73 20 69 |cel);...|./* is i|
|000019d0| 74 20 61 20 6d 6f 75 73 | 65 20 63 6c 69 63 6b 20 |t a mous|e click |
|000019e0| 69 6e 20 74 68 65 20 70 | 65 72 73 69 73 74 65 6e |in the p|ersisten|
|000019f0| 74 20 61 6e 73 77 65 72 | 20 63 68 65 63 6b 62 6f |t answer| checkbo|
|00001a00| 78 3f 20 2a 2f 0d 09 69 | 66 20 28 74 68 65 45 76 |x? */..i|f (theEv|
|00001a10| 65 6e 74 2d 3e 77 68 61 | 74 20 3d 3d 20 6d 6f 75 |ent->wha|t == mou|
|00001a20| 73 65 44 6f 77 6e 29 0d | 09 7b 0d 09 09 47 72 61 |seDown).|.{...Gra|
|00001a30| 66 50 74 72 20 73 61 76 | 65 3b 0d 09 09 50 6f 69 |fPtr sav|e;...Poi|
|00001a40| 6e 74 20 70 74 20 3d 20 | 74 68 65 45 76 65 6e 74 |nt pt = |theEvent|
|00001a50| 2d 3e 77 68 65 72 65 3b | 0d 09 09 73 68 6f 72 74 |->where;|...short|
|00001a60| 20 74 68 65 49 74 65 6d | 3b 0d 09 09 0d 09 09 47 | theItem|;......G|
|00001a70| 65 74 50 6f 72 74 28 26 | 73 61 76 65 29 3b 0d 09 |etPort(&|save);..|
|00001a80| 09 53 65 74 50 6f 72 74 | 28 74 68 65 44 69 61 6c |.SetPort|(theDial|
|00001a90| 6f 67 29 3b 0d 09 09 0d | 09 09 47 6c 6f 62 61 6c |og);....|..Global|
|00001aa0| 54 6f 4c 6f 63 61 6c 28 | 26 70 74 29 3b 0d 09 09 |ToLocal(|&pt);...|
|00001ab0| 74 68 65 49 74 65 6d 20 | 3d 20 46 69 6e 64 44 69 |theItem |= FindDi|
|00001ac0| 61 6c 6f 67 49 74 65 6d | 28 74 68 65 44 69 61 6c |alogItem|(theDial|
|00001ad0| 6f 67 2c 20 70 74 29 3b | 0d 09 09 69 66 20 28 74 |og, pt);|...if (t|
|00001ae0| 68 65 49 74 65 6d 20 3e | 3d 20 30 29 0d 09 09 7b |heItem >|= 0)...{|
|00001af0| 0d 09 09 09 48 61 6e 64 | 6c 65 20 68 3b 0d 09 09 |....Hand|le h;...|
|00001b00| 09 52 65 63 74 20 72 3b | 0d 09 09 09 73 68 6f 72 |.Rect r;|....shor|
|00001b10| 74 20 74 79 70 65 3b 0d | 09 09 09 0d 09 09 09 47 |t type;.|.......G|
|00001b20| 65 74 44 69 61 6c 6f 67 | 49 74 65 6d 28 74 68 65 |etDialog|Item(the|
|00001b30| 44 69 61 6c 6f 67 2c 20 | 2b 2b 74 68 65 49 74 65 |Dialog, |++theIte|
|00001b40| 6d 2c 20 26 74 79 70 65 | 2c 20 26 68 2c 20 26 72 |m, &type|, &h, &r|
|00001b50| 29 3b 0d 09 09 09 69 66 | 20 28 74 79 70 65 20 3d |);....if| (type =|
|00001b60| 3d 20 63 74 72 6c 49 74 | 65 6d 20 2b 20 63 68 6b |= ctrlIt|em + chk|
|00001b70| 43 74 72 6c 29 0d 09 09 | 09 7b 0d 09 09 09 09 43 |Ctrl)...|.{.....C|
|00001b80| 6f 6e 74 72 6f 6c 48 61 | 6e 64 6c 65 20 63 68 20 |ontrolHa|ndle ch |
|00001b90| 3d 20 28 43 6f 6e 74 72 | 6f 6c 48 61 6e 64 6c 65 |= (Contr|olHandle|
|00001ba0| 29 68 3b 0d 09 09 09 09 | 69 66 20 28 54 72 61 63 |)h;.....|if (Trac|
|00001bb0| 6b 43 6f 6e 74 72 6f 6c | 28 63 68 2c 20 70 74 2c |kControl|(ch, pt,|
|00001bc0| 20 4e 55 4c 4c 29 20 21 | 3d 20 30 29 0d 09 09 09 | NULL) !|= 0)....|
|00001bd0| 09 7b 0d 09 09 09 09 09 | 42 6f 6f 6c 65 61 6e 20 |.{......|Boolean |
|00001be0| 76 61 6c 75 65 20 3d 20 | 21 47 65 74 43 6f 6e 74 |value = |!GetCont|
|00001bf0| 72 6f 6c 56 61 6c 75 65 | 28 63 68 29 3b 0d 09 09 |rolValue|(ch);...|
|00001c00| 09 09 09 53 65 74 43 6f | 6e 74 72 6f 6c 56 61 6c |...SetCo|ntrolVal|
|00001c10| 75 65 28 63 68 2c 20 76 | 61 6c 75 65 29 3b 0d 09 |ue(ch, v|alue);..|
|00001c20| 09 09 09 09 70 50 65 72 | 73 69 73 74 65 6e 74 46 |....pPer|sistentF|
|00001c30| 6c 61 67 20 3d 20 76 61 | 6c 75 65 3b 0d 09 09 09 |lag = va|lue;....|
|00001c40| 09 09 74 68 65 45 76 65 | 6e 74 2d 3e 77 68 61 74 |..theEve|nt->what|
|00001c50| 20 3d 20 6e 75 6c 6c 45 | 76 65 6e 74 3b 20 2f 2a | = nullE|vent; /*|
|00001c60| 20 68 61 6e 64 6c 65 64 | 20 69 74 20 2a 2f 0d 09 | handled| it */..|
|00001c70| 09 09 09 09 53 65 74 50 | 6f 72 74 28 73 61 76 65 |....SetP|ort(save|
|00001c80| 29 3b 0d 09 09 09 09 09 | 72 65 74 75 72 6e 20 66 |);......|return f|
|00001c90| 61 6c 73 65 3b 0d 09 09 | 09 09 7d 0d 09 09 09 7d |alse;...|..}....}|
|00001ca0| 0d 09 09 09 0d 09 09 7d | 0d 09 09 53 65 74 50 6f |.......}|...SetPo|
|00001cb0| 72 74 28 73 61 76 65 29 | 3b 0d 09 7d 0d 09 0d 09 |rt(save)|;..}....|
|00001cc0| 72 65 74 75 72 6e 20 53 | 74 64 46 69 6c 74 65 72 |return S|tdFilter|
|00001cd0| 50 72 6f 63 28 74 68 65 | 44 69 61 6c 6f 67 2c 20 |Proc(the|Dialog, |
|00001ce0| 74 68 65 45 76 65 6e 74 | 2c 20 69 74 65 6d 48 69 |theEvent|, itemHi|
|00001cf0| 74 29 3b 0d 7d 0d 0d 0d | 43 6f 6e 66 69 72 6d 52 |t);.}...|ConfirmR|
|00001d00| 65 73 70 6f 6e 73 65 20 | 52 65 73 54 65 78 74 59 |esponse |ResTextY|
|00001d10| 65 73 4e 6f 43 61 6e 63 | 65 6c 28 73 68 6f 72 74 |esNoCanc|el(short|
|00001d20| 20 73 74 72 4c 69 73 74 | 49 44 2c 20 73 68 6f 72 | strList|ID, shor|
|00001d30| 74 20 73 74 72 49 6e 64 | 65 78 2c 0d 09 09 09 09 |t strInd|ex,.....|
|00001d40| 09 09 09 09 20 20 20 53 | 74 72 69 6e 67 50 74 72 |.... S|tringPtr|
|00001d50| 20 70 61 72 61 6d 31 2c | 20 53 74 72 69 6e 67 50 | param1,| StringP|
|00001d60| 74 72 20 70 61 72 61 6d | 32 2c 0d 09 09 09 09 09 |tr param|2,......|
|00001d70| 09 09 09 20 20 20 53 74 | 72 69 6e 67 50 74 72 20 |... St|ringPtr |
|00001d80| 70 61 72 61 6d 33 2c 20 | 53 74 72 69 6e 67 50 74 |param3, |StringPt|
|00001d90| 72 20 70 61 72 61 6d 34 | 29 0d 7b 0d 09 53 74 72 |r param4|).{..Str|
|00001da0| 32 35 35 20 6d 65 73 73 | 61 67 65 3b 0d 09 43 6f |255 mess|age;..Co|
|00001db0| 6e 66 69 72 6d 52 65 73 | 70 6f 6e 73 65 20 61 6e |nfirmRes|ponse an|
|00001dc0| 73 77 65 72 3b 0d 09 0d | 09 69 66 20 28 47 65 74 |swer;...|.if (Get|
|00001dd0| 50 65 72 73 69 73 74 65 | 6e 74 41 6e 73 77 65 72 |Persiste|ntAnswer|
|00001de0| 28 73 74 72 4c 69 73 74 | 49 44 2c 20 73 74 72 49 |(strList|ID, strI|
|00001df0| 6e 64 65 78 2c 20 26 61 | 6e 73 77 65 72 29 29 0d |ndex, &a|nswer)).|
|00001e00| 09 09 72 65 74 75 72 6e | 20 61 6e 73 77 65 72 3b |..return| answer;|
|00001e10| 0d 09 0d 09 52 65 70 6c | 61 63 65 49 6e 49 6e 64 |....Repl|aceInInd|
|00001e20| 53 74 72 69 6e 67 28 6d | 65 73 73 61 67 65 2c 20 |String(m|essage, |
|00001e30| 73 74 72 4c 69 73 74 49 | 44 2c 20 73 74 72 49 6e |strListI|D, strIn|
|00001e40| 64 65 78 2c 20 70 61 72 | 61 6d 31 2c 20 70 61 72 |dex, par|am1, par|
|00001e50| 61 6d 32 2c 20 70 61 72 | 61 6d 33 2c 20 70 61 72 |am2, par|am3, par|
|00001e60| 61 6d 34 29 3b 09 09 0d | 09 50 61 72 61 6d 54 65 |am4);...|.ParamTe|
|00001e70| 78 74 28 6d 65 73 73 61 | 67 65 2c 20 4e 55 4c 4c |xt(messa|ge, NULL|
|00001e80| 2c 20 4e 55 4c 4c 2c 20 | 4e 55 4c 4c 29 3b 0d 09 |, NULL, |NULL);..|
|00001e90| 70 50 65 72 73 69 73 74 | 65 6e 74 46 6c 61 67 20 |pPersist|entFlag |
|00001ea0| 3d 20 66 61 6c 73 65 3b | 0d 09 73 77 69 74 63 68 |= false;|..switch|
|00001eb0| 20 28 41 6c 65 72 74 28 | 6b 33 53 74 61 74 65 43 | (Alert(|k3StateC|
|00001ec0| 6f 6e 66 69 72 6d 41 6c | 65 72 74 2c 20 43 6f 6e |onfirmAl|ert, Con|
|00001ed0| 66 69 72 6d 41 6c 65 72 | 74 46 69 6c 74 65 72 29 |firmAler|tFilter)|
|00001ee0| 29 0d 09 7b 0d 09 63 61 | 73 65 20 6b 33 43 6f 6e |)..{..ca|se k3Con|
|00001ef0| 66 69 72 6d 59 65 73 49 | 74 65 6d 3a 0d 09 09 61 |firmYesI|tem:...a|
|00001f00| 6e 73 77 65 72 20 3d 20 | 6b 43 6f 6e 66 69 72 6d |nswer = |kConfirm|
|00001f10| 59 65 73 3b 0d 09 09 62 | 72 65 61 6b 3b 0d 09 63 |Yes;...b|reak;..c|
|00001f20| 61 73 65 20 6b 33 43 6f | 6e 66 69 72 6d 43 61 6e |ase k3Co|nfirmCan|
|00001f30| 63 65 6c 49 74 65 6d 3a | 0d 09 09 61 6e 73 77 65 |celItem:|...answe|
|00001f40| 72 20 3d 20 6b 43 6f 6e | 66 69 72 6d 43 61 6e 63 |r = kCon|firmCanc|
|00001f50| 65 6c 3b 0d 09 09 62 72 | 65 61 6b 3b 0d 09 63 61 |el;...br|eak;..ca|
|00001f60| 73 65 20 6b 33 43 6f 6e | 66 69 72 6d 4e 6f 49 74 |se k3Con|firmNoIt|
|00001f70| 65 6d 3a 0d 09 64 65 66 | 61 75 6c 74 3a 0d 09 09 |em:..def|ault:...|
|00001f80| 61 6e 73 77 65 72 20 3d | 20 6b 43 6f 6e 66 69 72 |answer =| kConfir|
|00001f90| 6d 4e 6f 3b 0d 09 09 62 | 72 65 61 6b 3b 0d 09 7d |mNo;...b|reak;..}|
|00001fa0| 0d 09 69 66 20 28 70 50 | 65 72 73 69 73 74 65 6e |..if (pP|ersisten|
|00001fb0| 74 46 6c 61 67 29 0d 09 | 09 50 65 72 73 69 73 74 |tFlag)..|.Persist|
|00001fc0| 65 6e 74 41 6e 73 77 65 | 72 28 73 74 72 4c 69 73 |entAnswe|r(strLis|
|00001fd0| 74 49 44 2c 20 73 74 72 | 49 6e 64 65 78 2c 20 61 |tID, str|Index, a|
|00001fe0| 6e 73 77 65 72 29 3b 0d | 09 72 65 74 75 72 6e 20 |nswer);.|.return |
|00001ff0| 61 6e 73 77 65 72 3b 0d | 7d 0d 0d 0d 42 6f 6f 6c |answer;.|}...Bool|
|00002000| 65 61 6e 20 52 65 73 54 | 65 78 74 59 65 73 4e 6f |ean ResT|extYesNo|
|00002010| 28 73 68 6f 72 74 20 73 | 74 72 4c 69 73 74 49 44 |(short s|trListID|
|00002020| 2c 20 73 68 6f 72 74 20 | 73 74 72 49 6e 64 65 78 |, short |strIndex|
|00002030| 2c 0d 09 09 09 09 09 20 | 53 74 72 69 6e 67 50 74 |,...... |StringPt|
|00002040| 72 20 70 61 72 61 6d 31 | 2c 20 53 74 72 69 6e 67 |r param1|, String|
|00002050| 50 74 72 20 70 61 72 61 | 6d 32 2c 0d 09 09 09 09 |Ptr para|m2,.....|
|00002060| 09 20 53 74 72 69 6e 67 | 50 74 72 20 70 61 72 61 |. String|Ptr para|
|00002070| 6d 33 2c 20 53 74 72 69 | 6e 67 50 74 72 20 70 61 |m3, Stri|ngPtr pa|
|00002080| 72 61 6d 34 29 0d 7b 0d | 09 53 74 72 32 35 35 20 |ram4).{.|.Str255 |
|00002090| 6d 65 73 73 61 67 65 3b | 0d 09 42 6f 6f 6c 65 61 |message;|..Boolea|
|000020a0| 6e 20 61 6e 73 77 65 72 | 3b 0d 09 43 6f 6e 66 69 |n answer|;..Confi|
|000020b0| 72 6d 52 65 73 70 6f 6e | 73 65 20 70 65 72 73 69 |rmRespon|se persi|
|000020c0| 73 74 65 6e 74 3b 0d 09 | 0d 09 69 66 20 28 47 65 |stent;..|..if (Ge|
|000020d0| 74 50 65 72 73 69 73 74 | 65 6e 74 41 6e 73 77 65 |tPersist|entAnswe|
|000020e0| 72 28 73 74 72 4c 69 73 | 74 49 44 2c 20 73 74 72 |r(strLis|tID, str|
|000020f0| 49 6e 64 65 78 2c 20 26 | 70 65 72 73 69 73 74 65 |Index, &|persiste|
|00002100| 6e 74 29 29 0d 09 09 72 | 65 74 75 72 6e 20 28 70 |nt))...r|eturn (p|
|00002110| 65 72 73 69 73 74 65 6e | 74 20 3d 3d 20 6b 43 6f |ersisten|t == kCo|
|00002120| 6e 66 69 72 6d 59 65 73 | 29 3b 0d 09 0d 09 52 65 |nfirmYes|);....Re|
|00002130| 70 6c 61 63 65 49 6e 49 | 6e 64 53 74 72 69 6e 67 |placeInI|ndString|
|00002140| 28 6d 65 73 73 61 67 65 | 2c 20 73 74 72 4c 69 73 |(message|, strLis|
|00002150| 74 49 44 2c 20 73 74 72 | 49 6e 64 65 78 2c 20 70 |tID, str|Index, p|
|00002160| 61 72 61 6d 31 2c 20 70 | 61 72 61 6d 32 2c 20 70 |aram1, p|aram2, p|
|00002170| 61 72 61 6d 33 2c 20 70 | 61 72 61 6d 34 29 3b 09 |aram3, p|aram4);.|
|00002180| 09 0d 09 50 61 72 61 6d | 54 65 78 74 28 6d 65 73 |...Param|Text(mes|
|00002190| 73 61 67 65 2c 20 4e 55 | 4c 4c 2c 20 4e 55 4c 4c |sage, NU|LL, NULL|
|000021a0| 2c 20 4e 55 4c 4c 29 3b | 0d 09 70 50 65 72 73 69 |, NULL);|..pPersi|
|000021b0| 73 74 65 6e 74 46 6c 61 | 67 20 3d 20 66 61 6c 73 |stentFla|g = fals|
|000021c0| 65 3b 0d 09 73 77 69 74 | 63 68 20 28 41 6c 65 72 |e;..swit|ch (Aler|
|000021d0| 74 28 6b 32 53 74 61 74 | 65 43 6f 6e 66 69 72 6d |t(k2Stat|eConfirm|
|000021e0| 41 6c 65 72 74 2c 20 43 | 6f 6e 66 69 72 6d 41 6c |Alert, C|onfirmAl|
|000021f0| 65 72 74 46 69 6c 74 65 | 72 29 29 0d 09 7b 0d 09 |ertFilte|r))..{..|
|00002200| 63 61 73 65 20 6b 32 43 | 6f 6e 66 69 72 6d 59 65 |case k2C|onfirmYe|
|00002210| 73 49 74 65 6d 3a 0d 09 | 09 61 6e 73 77 65 72 20 |sItem:..|.answer |
|00002220| 3d 20 74 72 75 65 3b 0d | 09 09 62 72 65 61 6b 3b |= true;.|..break;|
|00002230| 0d 09 63 61 73 65 20 6b | 32 43 6f 6e 66 69 72 6d |..case k|2Confirm|
|00002240| 4e 6f 49 74 65 6d 3a 0d | 09 64 65 66 61 75 6c 74 |NoItem:.|.default|
|00002250| 3a 0d 09 09 61 6e 73 77 | 65 72 20 3d 20 66 61 6c |:...answ|er = fal|
|00002260| 73 65 3b 0d 09 09 62 72 | 65 61 6b 3b 0d 09 7d 0d |se;...br|eak;..}.|
|00002270| 09 69 66 20 28 70 50 65 | 72 73 69 73 74 65 6e 74 |.if (pPe|rsistent|
|00002280| 46 6c 61 67 29 0d 09 09 | 50 65 72 73 69 73 74 65 |Flag)...|Persiste|
|00002290| 6e 74 41 6e 73 77 65 72 | 28 73 74 72 4c 69 73 74 |ntAnswer|(strList|
|000022a0| 49 44 2c 20 73 74 72 49 | 6e 64 65 78 2c 20 61 6e |ID, strI|ndex, an|
|000022b0| 73 77 65 72 20 3f 20 6b | 43 6f 6e 66 69 72 6d 59 |swer ? k|ConfirmY|
|000022c0| 65 73 20 3a 20 6b 43 6f | 6e 66 69 72 6d 4e 6f 29 |es : kCo|nfirmNo)|
|000022d0| 3b 0d 09 72 65 74 75 72 | 6e 20 61 6e 73 77 65 72 |;..retur|n answer|
|000022e0| 3b 0d 7d 0d 0d 0d 2f 2a | 0d 09 4d 6f 64 61 6c 20 |;.}.../*|..Modal |
|000022f0| 44 69 61 6c 6f 67 20 54 | 65 78 74 45 64 69 74 20 |Dialog T|extEdit |
|00002300| 75 73 65 72 69 74 65 6d | 20 73 6e 69 70 70 65 74 |useritem| snippet|
|00002310| 0d 09 53 74 65 76 65 20 | 46 61 6c 6b 65 6e 62 75 |..Steve |Falkenbu|
|00002320| 72 67 20 2d 2d 20 4d 61 | 63 44 54 53 0d 09 0d 09 |rg -- Ma|cDTS....|
|00002330| 54 68 69 73 20 73 6e 69 | 70 70 65 74 20 73 68 6f |This sni|ppet sho|
|00002340| 77 73 20 74 68 65 20 73 | 74 65 70 73 20 6e 65 63 |ws the s|teps nec|
|00002350| 65 73 73 61 72 79 20 74 | 6f 20 69 6d 70 6c 65 6d |essary t|o implem|
|00002360| 65 6e 74 20 61 20 73 63 | 72 6f 6c 6c 69 6e 67 2c |ent a sc|rolling,|
|00002370| 20 65 64 69 74 61 62 6c | 65 20 74 65 78 74 20 66 | editabl|e text f|
|00002380| 69 65 6c 64 0d 09 69 6e | 20 61 20 64 69 61 6c 6f |ield..in| a dialo|
|00002390| 67 2e 0d 09 0d 09 4d 6f | 64 69 66 69 65 64 20 74 |g.....Mo|dified t|
|000023a0| 6f 20 69 6d 70 6c 65 6d | 65 6e 74 20 61 6e 20 6f |o implem|ent an o|
|000023b0| 75 74 70 75 74 2f 64 69 | 61 67 6e 6f 73 74 69 63 |utput/di|agnostic|
|000023c0| 20 64 69 61 6c 6f 67 20 | 66 6f 72 20 50 72 6f 6a | dialog |for Proj|
|000023d0| 65 63 74 44 72 61 67 20 | 62 79 20 54 69 6d 20 4d |ectDrag |by Tim M|
|000023e0| 61 72 6f 6e 65 79 3b 0d | 2a 2f 0d 0d 0d 2f 2f 20 |aroney;.|*/...// |
|000023f0| 70 72 6f 74 6f 74 79 70 | 65 73 0d 0d 76 6f 69 64 |prototyp|es..void|
|00002400| 20 53 65 74 75 70 54 65 | 78 74 44 69 73 70 6c 61 | SetupTe|xtDispla|
|00002410| 79 44 69 61 6c 6f 67 28 | 44 69 61 6c 6f 67 50 74 |yDialog(|DialogPt|
|00002420| 72 20 74 68 65 44 69 61 | 6c 6f 67 2c 20 43 6f 6e |r theDia|log, Con|
|00002430| 73 74 53 74 72 32 35 35 | 50 61 72 61 6d 20 6d 65 |stStr255|Param me|
|00002440| 73 73 61 67 65 2c 20 43 | 53 74 72 69 6e 67 48 61 |ssage, C|StringHa|
|00002450| 6e 64 6c 65 20 74 68 65 | 54 65 78 74 29 3b 0d 0d |ndle the|Text);..|
|00002460| 70 61 73 63 61 6c 20 76 | 6f 69 64 20 45 64 69 74 |pascal v|oid Edit|
|00002470| 54 65 78 74 44 72 61 77 | 50 72 6f 63 28 44 69 61 |TextDraw|Proc(Dia|
|00002480| 6c 6f 67 50 74 72 20 74 | 68 65 44 69 61 6c 6f 67 |logPtr t|heDialog|
|00002490| 2c 73 68 6f 72 74 20 74 | 68 65 49 74 65 6d 29 3b |,short t|heItem);|
|000024a0| 0d 70 61 73 63 61 6c 20 | 42 6f 6f 6c 65 61 6e 20 |.pascal |Boolean |
|000024b0| 4d 79 44 69 61 6c 6f 67 | 46 69 6c 74 65 72 28 44 |MyDialog|Filter(D|
|000024c0| 69 61 6c 6f 67 50 74 72 | 20 74 68 65 44 69 61 6c |ialogPtr| theDial|
|000024d0| 6f 67 2c 45 76 65 6e 74 | 52 65 63 6f 72 64 20 2a |og,Event|Record *|
|000024e0| 65 76 2c 73 68 6f 72 74 | 20 2a 69 74 65 6d 48 69 |ev,short| *itemHi|
|000024f0| 74 29 3b 0d 42 6f 6f 6c | 65 61 6e 20 48 61 6e 64 |t);.Bool|ean Hand|
|00002500| 6c 65 4d 6f 75 73 65 28 | 44 69 61 6c 6f 67 50 74 |leMouse(|DialogPt|
|00002510| 72 20 74 68 65 44 69 61 | 6c 6f 67 2c 50 6f 69 6e |r theDia|log,Poin|
|00002520| 74 20 70 74 2c 73 68 6f | 72 74 20 6d 6f 64 69 66 |t pt,sho|rt modif|
|00002530| 69 65 72 73 29 3b 0d 0d | 76 6f 69 64 20 48 61 6e |iers);..|void Han|
|00002540| 64 6c 65 53 63 72 6f 6c | 6c 65 72 28 44 69 61 6c |dleScrol|ler(Dial|
|00002550| 6f 67 50 74 72 20 74 68 | 65 44 69 61 6c 6f 67 2c |ogPtr th|eDialog,|
|00002560| 50 6f 69 6e 74 20 70 74 | 29 3b 0d 70 61 73 63 61 |Point pt|);.pasca|
|00002570| 6c 20 76 6f 69 64 20 53 | 63 72 6f 6c 6c 42 61 72 |l void S|crollBar|
|00002580| 41 63 74 69 6f 6e 28 43 | 6f 6e 74 72 6f 6c 48 61 |Action(C|ontrolHa|
|00002590| 6e 64 6c 65 20 74 68 65 | 43 6f 6e 74 72 6f 6c 2c |ndle the|Control,|
|000025a0| 73 68 6f 72 74 20 70 61 | 72 74 29 3b 0d 76 6f 69 |short pa|rt);.voi|
|000025b0| 64 20 53 63 72 6f 6c 6c | 54 65 78 74 28 44 69 61 |d Scroll|Text(Dia|
|000025c0| 6c 6f 67 50 74 72 20 74 | 68 65 44 69 61 6c 6f 67 |logPtr t|heDialog|
|000025d0| 2c 20 73 68 6f 72 74 20 | 6c 69 6e 65 73 29 3b 0d |, short |lines);.|
|000025e0| 76 6f 69 64 20 52 65 41 | 6c 69 67 6e 54 65 78 74 |void ReA|lignText|
|000025f0| 54 6f 53 63 72 6f 6c 6c | 62 61 72 28 44 69 61 6c |ToScroll|bar(Dial|
|00002600| 6f 67 50 74 72 20 74 68 | 65 44 69 61 6c 6f 67 29 |ogPtr th|eDialog)|
|00002610| 3b 0d 76 6f 69 64 20 52 | 65 41 6c 69 67 6e 53 63 |;.void R|eAlignSc|
|00002620| 72 6f 6c 6c 62 61 72 54 | 6f 54 65 78 74 28 44 69 |rollbarT|oText(Di|
|00002630| 61 6c 6f 67 50 74 72 20 | 74 68 65 44 69 61 6c 6f |alogPtr |theDialo|
|00002640| 67 29 3b 0d 0d 43 6f 6e | 74 72 6f 6c 48 61 6e 64 |g);..Con|trolHand|
|00002650| 6c 65 20 47 65 74 53 63 | 72 6f 6c 6c 42 61 72 28 |le GetSc|rollBar(|
|00002660| 44 69 61 6c 6f 67 50 74 | 72 20 74 68 65 44 69 61 |DialogPt|r theDia|
|00002670| 6c 6f 67 29 3b 0d 0d 0d | 0d 2f 2a 09 64 69 73 70 |log);...|./*.disp|
|00002680| 6c 61 79 20 64 69 61 6c | 6f 67 2c 20 61 6e 64 20 |lay dial|og, and |
|00002690| 68 61 6e 64 6c 65 20 70 | 72 65 74 74 79 20 73 74 |handle p|retty st|
|000026a0| 61 6e 64 61 72 64 20 4d | 6f 64 61 6c 44 69 61 6c |andard M|odalDial|
|000026b0| 6f 67 20 6c 6f 6f 70 2e | 20 20 54 68 65 20 6d 6f |og loop.| The mo|
|000026c0| 64 61 6c 20 64 69 61 6c | 6f 67 20 6c 6f 6f 70 20 |dal dial|og loop |
|000026d0| 64 6f 65 73 6e 27 74 0d | 09 68 61 6e 64 6c 65 20 |doesn't.|.handle |
|000026e0| 69 74 65 6d 20 68 69 74 | 73 20 74 6f 20 74 68 65 |item hit|s to the|
|000026f0| 20 73 63 72 6f 6c 6c 20 | 62 61 72 20 6f 72 20 74 | scroll |bar or t|
|00002700| 65 78 74 20 69 74 65 6d | 73 2e 20 20 54 68 65 73 |ext item|s. Thes|
|00002710| 65 20 61 72 65 20 68 61 | 6e 64 6c 65 64 20 74 68 |e are ha|ndled th|
|00002720| 72 6f 75 67 68 20 74 68 | 65 20 66 69 6c 74 65 72 |rough th|e filter|
|00002730| 0d 09 70 72 6f 63 65 64 | 75 72 65 0d 2a 2f 0d 0d |..proced|ure.*/..|
|00002740| 0d 76 6f 69 64 20 52 65 | 73 54 65 78 74 44 69 73 |.void Re|sTextDis|
|00002750| 70 6c 61 79 44 69 61 6c | 6f 67 28 73 68 6f 72 74 |playDial|og(short|
|00002760| 20 73 74 72 4c 69 73 74 | 49 44 2c 20 73 68 6f 72 | strList|ID, shor|
|00002770| 74 20 69 6e 64 65 78 2c | 20 43 53 74 72 69 6e 67 |t index,| CString|
|00002780| 48 61 6e 64 6c 65 20 74 | 68 65 54 65 78 74 29 0d |Handle t|heText).|
|00002790| 7b 0d 09 53 74 72 32 35 | 35 20 6d 65 73 73 61 67 |{..Str25|5 messag|
|000027a0| 65 3b 0d 09 47 65 74 49 | 6e 64 53 74 72 69 6e 67 |e;..GetI|ndString|
|000027b0| 28 6d 65 73 73 61 67 65 | 2c 20 73 74 72 4c 69 73 |(message|, strLis|
|000027c0| 74 49 44 2c 20 69 6e 64 | 65 78 29 3b 0d 09 54 65 |tID, ind|ex);..Te|
|000027d0| 78 74 44 69 73 70 6c 61 | 79 44 69 61 6c 6f 67 28 |xtDispla|yDialog(|
|000027e0| 6d 65 73 73 61 67 65 2c | 20 74 68 65 54 65 78 74 |message,| theText|
|000027f0| 29 3b 0d 7d 0d 0d 0d 76 | 6f 69 64 20 54 65 78 74 |);.}...v|oid Text|
|00002800| 44 69 73 70 6c 61 79 44 | 69 61 6c 6f 67 28 43 6f |DisplayD|ialog(Co|
|00002810| 6e 73 74 53 74 72 32 35 | 35 50 61 72 61 6d 20 6d |nstStr25|5Param m|
|00002820| 65 73 73 61 67 65 2c 20 | 43 53 74 72 69 6e 67 48 |essage, |CStringH|
|00002830| 61 6e 64 6c 65 20 74 68 | 65 54 65 78 74 29 0d 7b |andle th|eText).{|
|00002840| 0d 09 44 69 61 6c 6f 67 | 50 74 72 20 74 68 65 44 |..Dialog|Ptr theD|
|00002850| 69 61 6c 6f 67 3b 0d 09 | 73 68 6f 72 74 20 69 74 |ialog;..|short it|
|00002860| 65 6d 3b 0d 09 0d 09 74 | 68 65 44 69 61 6c 6f 67 |em;....t|heDialog|
|00002870| 20 3d 20 47 65 74 4e 65 | 77 44 69 61 6c 6f 67 28 | = GetNe|wDialog(|
|00002880| 6b 54 65 78 74 44 69 73 | 70 6c 61 79 44 69 61 6c |kTextDis|playDial|
|00002890| 6f 67 2c 20 4e 55 4c 4c | 2c 20 28 57 69 6e 64 6f |og, NULL|, (Windo|
|000028a0| 77 50 74 72 29 2d 31 4c | 29 3b 0d 09 53 65 74 75 |wPtr)-1L|);..Setu|
|000028b0| 70 54 65 78 74 44 69 73 | 70 6c 61 79 44 69 61 6c |pTextDis|playDial|
|000028c0| 6f 67 28 74 68 65 44 69 | 61 6c 6f 67 2c 20 6d 65 |og(theDi|alog, me|
|000028d0| 73 73 61 67 65 2c 20 74 | 68 65 54 65 78 74 29 3b |ssage, t|heText);|
|000028e0| 0d 0d 09 53 68 6f 77 57 | 69 6e 64 6f 77 28 74 68 |...ShowW|indow(th|
|000028f0| 65 44 69 61 6c 6f 67 29 | 3b 0d 09 64 6f 20 7b 0d |eDialog)|;..do {.|
|00002900| 09 09 4d 6f 64 61 6c 44 | 69 61 6c 6f 67 28 4d 79 |..ModalD|ialog(My|
|00002910| 44 69 61 6c 6f 67 46 69 | 6c 74 65 72 2c 26 69 74 |DialogFi|lter,&it|
|00002920| 65 6d 29 3b 0d 09 7d 20 | 77 68 69 6c 65 20 28 69 |em);..} |while (i|
|00002930| 74 65 6d 20 21 3d 20 6f | 6b 29 3b 0d 09 0d 09 54 |tem != o|k);....T|
|00002940| 45 44 69 73 70 6f 73 65 | 28 70 54 65 78 74 48 61 |EDispose|(pTextHa|
|00002950| 6e 64 6c 65 29 3b 0d 09 | 44 69 73 70 6f 73 65 44 |ndle);..|DisposeD|
|00002960| 69 61 6c 6f 67 28 74 68 | 65 44 69 61 6c 6f 67 29 |ialog(th|eDialog)|
|00002970| 3b 0d 7d 0d 0d 0d 2f 2a | 09 43 72 65 61 74 65 73 |;.}.../*|.Creates|
|00002980| 20 74 68 65 20 6e 65 63 | 65 73 73 61 72 79 20 64 | the nec|essary d|
|00002990| 61 74 61 20 73 74 72 75 | 63 74 75 72 65 73 20 6e |ata stru|ctures n|
|000029a0| 65 63 65 73 73 61 72 79 | 20 74 6f 20 75 73 65 20 |ecessary| to use |
|000029b0| 74 68 65 20 74 65 78 74 | 65 64 69 74 20 69 74 65 |the text|edit ite|
|000029c0| 6d 20 69 6e 20 6f 75 72 | 20 64 69 61 6c 6f 67 2e |m in our| dialog.|
|000029d0| 0d 2a 2f 0d 0d 76 6f 69 | 64 20 53 65 74 75 70 54 |.*/..voi|d SetupT|
|000029e0| 65 78 74 44 69 73 70 6c | 61 79 44 69 61 6c 6f 67 |extDispl|ayDialog|
|000029f0| 28 44 69 61 6c 6f 67 50 | 74 72 20 74 68 65 44 69 |(DialogP|tr theDi|
|00002a00| 61 6c 6f 67 2c 20 43 6f | 6e 73 74 53 74 72 32 35 |alog, Co|nstStr25|
|00002a10| 35 50 61 72 61 6d 20 6d | 65 73 73 61 67 65 2c 20 |5Param m|essage, |
|00002a20| 43 53 74 72 69 6e 67 48 | 61 6e 64 6c 65 20 74 68 |CStringH|andle th|
|00002a30| 65 54 65 78 74 29 0d 7b | 0d 09 73 68 6f 72 74 20 |eText).{|..short |
|00002a40| 69 54 79 70 65 3b 0d 09 | 48 61 6e 64 6c 65 20 69 |iType;..|Handle i|
|00002a50| 48 6e 64 6c 3b 0d 09 52 | 65 63 74 20 69 52 65 63 |Hndl;..R|ect iRec|
|00002a60| 74 3b 0d 09 43 6f 6e 74 | 72 6f 6c 48 61 6e 64 6c |t;..Cont|rolHandl|
|00002a70| 65 20 74 68 65 43 6f 6e | 74 72 6f 6c 3b 0d 09 42 |e theCon|trol;..B|
|00002a80| 79 74 65 20 73 74 61 74 | 65 3b 0d 09 0d 09 53 65 |yte stat|e;....Se|
|00002a90| 74 50 6f 72 74 28 74 68 | 65 44 69 61 6c 6f 67 29 |tPort(th|eDialog)|
|00002aa0| 3b 0d 09 0d 09 47 65 74 | 44 49 74 65 6d 28 74 68 |;....Get|DItem(th|
|00002ab0| 65 44 69 61 6c 6f 67 2c | 6b 53 63 72 6f 6c 6c 65 |eDialog,|kScrolle|
|00002ac0| 72 49 74 65 6d 2c 26 69 | 54 79 70 65 2c 26 69 48 |rItem,&i|Type,&iH|
|00002ad0| 6e 64 6c 2c 26 69 52 65 | 63 74 29 3b 09 2f 2f 20 |ndl,&iRe|ct);.// |
|00002ae0| 73 65 74 20 75 70 20 74 | 68 65 20 73 63 72 6f 6c |set up t|he scrol|
|00002af0| 6c 20 62 61 72 0d 09 74 | 68 65 43 6f 6e 74 72 6f |l bar..t|heContro|
|00002b00| 6c 20 3d 20 28 43 6f 6e | 74 72 6f 6c 48 61 6e 64 |l = (Con|trolHand|
|00002b10| 6c 65 29 69 48 6e 64 6c | 3b 0d 09 53 65 74 43 74 |le)iHndl|;..SetCt|
|00002b20| 6c 4d 69 6e 28 74 68 65 | 43 6f 6e 74 72 6f 6c 2c |lMin(the|Control,|
|00002b30| 30 29 3b 09 09 09 09 09 | 09 09 09 09 09 2f 2f 20 |0);.....|.....// |
|00002b40| 28 69 74 27 73 20 73 74 | 6f 72 65 64 20 69 6e 20 |(it's st|ored in |
|00002b50| 61 20 43 4e 54 4c 29 0d | 09 53 65 74 43 74 6c 4d |a CNTL).|.SetCtlM|
|00002b60| 61 78 28 74 68 65 43 6f | 6e 74 72 6f 6c 2c 30 29 |ax(theCo|ntrol,0)|
|00002b70| 3b 0d 0d 09 47 65 74 44 | 49 74 65 6d 28 74 68 65 |;...GetD|Item(the|
|00002b80| 44 69 61 6c 6f 67 2c 6b | 4d 65 73 73 61 67 65 49 |Dialog,k|MessageI|
|00002b90| 74 65 6d 2c 26 69 54 79 | 70 65 2c 26 69 48 6e 64 |tem,&iTy|pe,&iHnd|
|00002ba0| 6c 2c 26 69 52 65 63 74 | 29 3b 0d 09 53 65 74 49 |l,&iRect|);..SetI|
|00002bb0| 54 65 78 74 28 69 48 6e | 64 6c 2c 20 6d 65 73 73 |Text(iHn|dl, mess|
|00002bc0| 61 67 65 29 3b 0d 0d 09 | 47 65 74 44 49 74 65 6d |age);...|GetDItem|
|00002bd0| 28 74 68 65 44 69 61 6c | 6f 67 2c 6b 45 64 69 74 |(theDial|og,kEdit|
|00002be0| 54 65 78 74 49 74 65 6d | 2c 26 69 54 79 70 65 2c |TextItem|,&iType,|
|00002bf0| 26 69 48 6e 64 6c 2c 26 | 69 52 65 63 74 29 3b 0d |&iHndl,&|iRect);.|
|00002c00| 09 53 65 74 44 49 74 65 | 6d 28 74 68 65 44 69 61 |.SetDIte|m(theDia|
|00002c10| 6c 6f 67 2c 6b 45 64 69 | 74 54 65 78 74 49 74 65 |log,kEdi|tTextIte|
|00002c20| 6d 2c 69 54 79 70 65 2c | 28 48 61 6e 64 6c 65 29 |m,iType,|(Handle)|
|00002c30| 45 64 69 74 54 65 78 74 | 44 72 61 77 50 72 6f 63 |EditText|DrawProc|
|00002c40| 2c 26 69 52 65 63 74 29 | 3b 0d 09 0d 09 49 6e 73 |,&iRect)|;....Ins|
|00002c50| 65 74 52 65 63 74 28 26 | 69 52 65 63 74 2c 6b 4d |etRect(&|iRect,kM|
|00002c60| 61 72 67 69 6e 2c 6b 4d | 61 72 67 69 6e 29 3b 0d |argin,kM|argin);.|
|00002c70| 09 0d 09 54 65 78 74 46 | 6f 6e 74 28 61 70 70 6c |...TextF|ont(appl|
|00002c80| 46 6f 6e 74 29 3b 0d 09 | 54 65 78 74 53 69 7a 65 |Font);..|TextSize|
|00002c90| 28 39 29 3b 0d 09 70 54 | 65 78 74 48 61 6e 64 6c |(9);..pT|extHandl|
|00002ca0| 65 20 3d 20 54 45 4e 65 | 77 28 26 69 52 65 63 74 |e = TENe|w(&iRect|
|00002cb0| 2c 26 69 52 65 63 74 29 | 3b 09 09 09 2f 2f 20 63 |,&iRect)|;...// c|
|00002cc0| 72 65 61 74 65 20 6f 75 | 72 20 74 65 78 74 65 64 |reate ou|r texted|
|00002cd0| 69 74 20 69 74 65 6d 0d | 09 73 74 61 74 65 20 3d |it item.|.state =|
|00002ce0| 20 48 47 65 74 53 74 61 | 74 65 28 28 48 61 6e 64 | HGetSta|te((Hand|
|00002cf0| 6c 65 29 74 68 65 54 65 | 78 74 29 3b 0d 09 48 4c |le)theTe|xt);..HL|
|00002d00| 6f 63 6b 28 28 48 61 6e | 64 6c 65 29 74 68 65 54 |ock((Han|dle)theT|
|00002d10| 65 78 74 29 3b 0d 09 54 | 45 53 65 74 54 65 78 74 |ext);..T|ESetText|
|00002d20| 28 2a 74 68 65 54 65 78 | 74 2c 20 47 65 74 48 61 |(*theTex|t, GetHa|
|00002d30| 6e 64 6c 65 53 69 7a 65 | 28 28 48 61 6e 64 6c 65 |ndleSize|((Handle|
|00002d40| 29 74 68 65 54 65 78 74 | 29 20 2d 20 31 2c 20 70 |)theText|) - 1, p|
|00002d50| 54 65 78 74 48 61 6e 64 | 6c 65 29 3b 0d 09 48 53 |TextHand|le);..HS|
|00002d60| 65 74 53 74 61 74 65 28 | 28 48 61 6e 64 6c 65 29 |etState(|(Handle)|
|00002d70| 74 68 65 54 65 78 74 2c | 20 73 74 61 74 65 29 3b |theText,| state);|
|00002d80| 0d 09 53 65 74 43 74 6c | 4d 61 78 28 74 68 65 43 |..SetCtl|Max(theC|
|00002d90| 6f 6e 74 72 6f 6c 2c 20 | 28 2a 70 54 65 78 74 48 |ontrol, |(*pTextH|
|00002da0| 61 6e 64 6c 65 29 2d 3e | 6e 4c 69 6e 65 73 29 3b |andle)->|nLines);|
|00002db0| 0d 09 54 65 78 74 46 6f | 6e 74 28 30 29 3b 0d 09 |..TextFo|nt(0);..|
|00002dc0| 54 65 78 74 53 69 7a 65 | 28 30 29 3b 0d 0d 09 53 |TextSize|(0);...S|
|00002dd0| 65 74 44 69 61 6c 6f 67 | 44 65 66 61 75 6c 74 49 |etDialog|DefaultI|
|00002de0| 74 65 6d 28 74 68 65 44 | 69 61 6c 6f 67 2c 20 6f |tem(theD|ialog, o|
|00002df0| 6b 29 3b 0d 09 53 65 74 | 44 69 61 6c 6f 67 54 72 |k);..Set|DialogTr|
|00002e00| 61 63 6b 73 43 75 72 73 | 6f 72 28 74 68 65 44 69 |acksCurs|or(theDi|
|00002e10| 61 6c 6f 67 2c 20 74 72 | 75 65 29 3b 0d 7d 0d 0d |alog, tr|ue);.}..|
|00002e20| 0d 2f 2a 09 64 69 61 6c | 6f 67 20 75 73 65 72 20 |./*.dial|og user |
|00002e30| 69 74 65 6d 20 64 72 61 | 77 20 70 72 6f 63 65 64 |item dra|w proced|
|00002e40| 75 72 65 20 66 6f 72 20 | 74 65 78 74 20 62 6f 78 |ure for |text box|
|00002e50| 2e 20 20 49 74 20 6a 75 | 73 74 20 63 61 6c 6c 73 |. It ju|st calls|
|00002e60| 20 46 72 61 6d 65 52 65 | 63 74 0d 2a 2f 0d 0d 70 | FrameRe|ct.*/..p|
|00002e70| 61 73 63 61 6c 20 76 6f | 69 64 20 45 64 69 74 54 |ascal vo|id EditT|
|00002e80| 65 78 74 44 72 61 77 50 | 72 6f 63 28 44 69 61 6c |extDrawP|roc(Dial|
|00002e90| 6f 67 50 74 72 20 74 68 | 65 44 69 61 6c 6f 67 2c |ogPtr th|eDialog,|
|00002ea0| 73 68 6f 72 74 20 74 68 | 65 49 74 65 6d 29 0d 7b |short th|eItem).{|
|00002eb0| 0d 09 73 68 6f 72 74 20 | 69 54 79 70 65 3b 0d 09 |..short |iType;..|
|00002ec0| 48 61 6e 64 6c 65 20 69 | 48 6e 64 6c 3b 0d 09 52 |Handle i|Hndl;..R|
|00002ed0| 65 63 74 20 69 52 65 63 | 74 3b 0d 09 47 72 61 66 |ect iRec|t;..Graf|
|00002ee0| 50 74 72 20 73 61 76 65 | 50 6f 72 74 3b 0d 09 0d |Ptr save|Port;...|
|00002ef0| 09 47 65 74 50 6f 72 74 | 28 26 73 61 76 65 50 6f |.GetPort|(&savePo|
|00002f00| 72 74 29 3b 0d 09 53 65 | 74 50 6f 72 74 28 74 68 |rt);..Se|tPort(th|
|00002f10| 65 44 69 61 6c 6f 67 29 | 3b 0d 09 0d 09 47 65 74 |eDialog)|;....Get|
|00002f20| 44 49 74 65 6d 28 74 68 | 65 44 69 61 6c 6f 67 2c |DItem(th|eDialog,|
|00002f30| 74 68 65 49 74 65 6d 2c | 26 69 54 79 70 65 2c 26 |theItem,|&iType,&|
|00002f40| 69 48 6e 64 6c 2c 26 69 | 52 65 63 74 29 3b 0d 09 |iHndl,&i|Rect);..|
|00002f50| 46 72 61 6d 65 52 65 63 | 74 28 26 69 52 65 63 74 |FrameRec|t(&iRect|
|00002f60| 29 3b 0d 09 0d 09 54 45 | 55 70 64 61 74 65 28 26 |);....TE|Update(&|
|00002f70| 69 52 65 63 74 2c 20 70 | 54 65 78 74 48 61 6e 64 |iRect, p|TextHand|
|00002f80| 6c 65 29 3b 0d 09 0d 09 | 53 65 74 50 6f 72 74 28 |le);....|SetPort(|
|00002f90| 73 61 76 65 50 6f 72 74 | 29 3b 0d 7d 0d 0d 0d 2f |savePort|);.}.../|
|00002fa0| 2a 09 74 68 69 73 20 69 | 73 20 74 68 65 20 6d 61 |*.this i|s the ma|
|00002fb0| 69 6e 20 64 69 73 70 61 | 74 63 68 65 72 20 66 6f |in dispa|tcher fo|
|00002fc0| 72 20 65 76 65 6e 74 73 | 20 74 6f 20 62 65 20 70 |r events| to be p|
|00002fd0| 61 73 73 65 64 20 6f 66 | 66 20 74 6f 20 74 68 65 |assed of|f to the|
|00002fe0| 20 73 63 72 6f 6c 6c 20 | 62 61 72 20 6f 72 20 74 | scroll |bar or t|
|00002ff0| 65 78 74 65 64 69 74 20 | 62 6f 78 2e 0d 09 6c 6f |extedit |box...lo|
|00003000| 6f 6b 73 20 73 6f 72 74 | 20 6f 66 20 6c 69 6b 65 |oks sort| of like|
|00003010| 20 61 20 57 61 69 74 4e | 65 78 74 45 76 65 6e 74 | a WaitN|extEvent|
|00003020| 20 65 76 65 6e 74 20 68 | 61 6e 64 6c 65 72 2e 0d | event h|andler..|
|00003030| 2a 2f 0d 0d 70 61 73 63 | 61 6c 20 42 6f 6f 6c 65 |*/..pasc|al Boole|
|00003040| 61 6e 20 4d 79 44 69 61 | 6c 6f 67 46 69 6c 74 65 |an MyDia|logFilte|
|00003050| 72 28 44 69 61 6c 6f 67 | 50 74 72 20 74 68 65 44 |r(Dialog|Ptr theD|
|00003060| 69 61 6c 6f 67 2c 45 76 | 65 6e 74 52 65 63 6f 72 |ialog,Ev|entRecor|
|00003070| 64 20 2a 65 76 2c 73 68 | 6f 72 74 20 2a 69 74 65 |d *ev,sh|ort *ite|
|00003080| 6d 48 69 74 29 0d 7b 0d | 09 42 6f 6f 6c 65 61 6e |mHit).{.|.Boolean|
|00003090| 20 68 61 6e 64 6c 65 64 | 49 74 20 3d 20 53 74 64 | handled|It = Std|
|000030a0| 46 69 6c 74 65 72 50 72 | 6f 63 28 74 68 65 44 69 |FilterPr|oc(theDi|
|000030b0| 61 6c 6f 67 2c 20 65 76 | 2c 20 69 74 65 6d 48 69 |alog, ev|, itemHi|
|000030c0| 74 29 3b 0d 09 69 66 20 | 28 68 61 6e 64 6c 65 64 |t);..if |(handled|
|000030d0| 49 74 29 0d 09 09 72 65 | 74 75 72 6e 20 74 72 75 |It)...re|turn tru|
|000030e0| 65 3b 0d 0d 09 73 77 69 | 74 63 68 20 28 65 76 2d |e;...swi|tch (ev-|
|000030f0| 3e 77 68 61 74 29 20 7b | 0d 09 09 63 61 73 65 20 |>what) {|...case |
|00003100| 6d 6f 75 73 65 44 6f 77 | 6e 3a 0d 09 09 09 72 65 |mouseDow|n:....re|
|00003110| 74 75 72 6e 20 48 61 6e | 64 6c 65 4d 6f 75 73 65 |turn Han|dleMouse|
|00003120| 28 74 68 65 44 69 61 6c | 6f 67 2c 65 76 2d 3e 77 |(theDial|og,ev->w|
|00003130| 68 65 72 65 2c 65 76 2d | 3e 6d 6f 64 69 66 69 65 |here,ev-|>modifie|
|00003140| 72 73 29 3b 0d 09 09 64 | 65 66 61 75 6c 74 3a 0d |rs);...d|efault:.|
|00003150| 09 09 09 72 65 74 75 72 | 6e 20 66 61 6c 73 65 3b |...retur|n false;|
|00003160| 0d 09 7d 0d 7d 0d 0d 0d | 2f 2a 09 6d 6f 75 73 65 |..}.}...|/*.mouse|
|00003170| 2d 64 6f 77 6e 20 68 61 | 6e 64 65 72 2e 20 20 68 |-down ha|nder. h|
|00003180| 65 72 65 2c 20 77 65 20 | 73 65 65 20 69 66 20 74 |ere, we |see if t|
|00003190| 68 65 20 6d 6f 75 73 65 | 64 6f 77 6e 20 77 61 73 |he mouse|down was|
|000031a0| 20 69 6e 20 74 68 65 20 | 73 63 72 6f 6c 6c 62 61 | in the |scrollba|
|000031b0| 72 20 6f 72 20 69 6e 20 | 74 68 65 20 74 65 78 74 |r or in |the text|
|000031c0| 65 64 69 74 0d 09 72 65 | 63 6f 72 64 2e 20 20 69 |edit..re|cord. i|
|000031d0| 66 20 69 6e 20 74 68 65 | 20 74 65 78 74 65 64 69 |f in the| textedi|
|000031e0| 74 20 69 74 65 6d 2c 20 | 77 65 20 63 61 6c 6c 20 |t item, |we call |
|000031f0| 74 65 63 6c 69 63 6b 2e | 20 20 49 66 20 69 6e 20 |teclick.| If in |
|00003200| 74 68 65 20 73 63 72 6f | 6c 6c 62 61 72 2c 20 77 |the scro|llbar, w|
|00003210| 65 20 63 61 6c 6c 20 68 | 61 6e 64 6c 65 73 63 72 |e call h|andlescr|
|00003220| 6f 6c 6c 65 72 0d 09 74 | 6f 20 64 6f 20 66 75 72 |oller..t|o do fur|
|00003230| 74 68 65 72 20 70 72 6f | 63 65 73 73 69 6e 67 0d |ther pro|cessing.|
|00003240| 2a 2f 0d 0d 42 6f 6f 6c | 65 61 6e 20 48 61 6e 64 |*/..Bool|ean Hand|
|00003250| 6c 65 4d 6f 75 73 65 28 | 44 69 61 6c 6f 67 50 74 |leMouse(|DialogPt|
|00003260| 72 20 74 68 65 44 69 61 | 6c 6f 67 2c 50 6f 69 6e |r theDia|log,Poin|
|00003270| 74 20 70 74 2c 73 68 6f | 72 74 20 6d 6f 64 69 66 |t pt,sho|rt modif|
|00003280| 69 65 72 73 29 0d 7b 0d | 09 73 68 6f 72 74 20 69 |iers).{.|.short i|
|00003290| 54 79 70 65 3b 0d 09 48 | 61 6e 64 6c 65 20 69 48 |Type;..H|andle iH|
|000032a0| 6e 64 6c 3b 0d 09 52 65 | 63 74 20 74 65 78 74 52 |ndl;..Re|ct textR|
|000032b0| 65 63 74 2c 73 63 72 6f | 6c 6c 65 72 52 65 63 74 |ect,scro|llerRect|
|000032c0| 3b 0d 09 47 72 61 66 50 | 74 72 20 73 61 76 65 50 |;..GrafP|tr saveP|
|000032d0| 6f 72 74 3b 0d 09 42 6f | 6f 6c 65 61 6e 20 73 68 |ort;..Bo|olean sh|
|000032e0| 69 66 74 44 6f 77 6e 2c | 72 65 73 75 6c 74 3b 0d |iftDown,|result;.|
|000032f0| 09 0d 09 47 65 74 50 6f | 72 74 28 26 73 61 76 65 |...GetPo|rt(&save|
|00003300| 50 6f 72 74 29 3b 0d 09 | 53 65 74 50 6f 72 74 28 |Port);..|SetPort(|
|00003310| 74 68 65 44 69 61 6c 6f | 67 29 3b 0d 09 0d 09 73 |theDialo|g);....s|
|00003320| 68 69 66 74 44 6f 77 6e | 20 3d 20 6d 6f 64 69 66 |hiftDown| = modif|
|00003330| 69 65 72 73 20 26 20 73 | 68 69 66 74 4b 65 79 3b |iers & s|hiftKey;|
|00003340| 0d 09 47 6c 6f 62 61 6c | 54 6f 4c 6f 63 61 6c 28 |..Global|ToLocal(|
|00003350| 26 70 74 29 3b 0d 09 0d | 09 47 65 74 44 49 74 65 |&pt);...|.GetDIte|
|00003360| 6d 28 74 68 65 44 69 61 | 6c 6f 67 2c 6b 45 64 69 |m(theDia|log,kEdi|
|00003370| 74 54 65 78 74 49 74 65 | 6d 2c 26 69 54 79 70 65 |tTextIte|m,&iType|
|00003380| 2c 26 69 48 6e 64 6c 2c | 26 74 65 78 74 52 65 63 |,&iHndl,|&textRec|
|00003390| 74 29 3b 0d 09 47 65 74 | 44 49 74 65 6d 28 74 68 |t);..Get|DItem(th|
|000033a0| 65 44 69 61 6c 6f 67 2c | 6b 53 63 72 6f 6c 6c 65 |eDialog,|kScrolle|
|000033b0| 72 49 74 65 6d 2c 26 69 | 54 79 70 65 2c 26 69 48 |rItem,&i|Type,&iH|
|000033c0| 6e 64 6c 2c 26 73 63 72 | 6f 6c 6c 65 72 52 65 63 |ndl,&scr|ollerRec|
|000033d0| 74 29 3b 0d 09 0d 09 69 | 66 20 28 50 74 49 6e 52 |t);....i|f (PtInR|
|000033e0| 65 63 74 28 70 74 2c 26 | 73 63 72 6f 6c 6c 65 72 |ect(pt,&|scroller|
|000033f0| 52 65 63 74 29 29 20 7b | 0d 09 09 48 61 6e 64 6c |Rect)) {|...Handl|
|00003400| 65 53 63 72 6f 6c 6c 65 | 72 28 74 68 65 44 69 61 |eScrolle|r(theDia|
|00003410| 6c 6f 67 2c 70 74 29 3b | 0d 09 09 72 65 73 75 6c |log,pt);|...resul|
|00003420| 74 20 3d 20 74 72 75 65 | 3b 0d 09 7d 0d 09 65 6c |t = true|;..}..el|
|00003430| 73 65 0d 09 7b 0d 09 09 | 72 65 73 75 6c 74 20 3d |se..{...|result =|
|00003440| 20 66 61 6c 73 65 3b 0d | 09 7d 0d 09 09 0d 09 53 | false;.|.}.....S|
|00003450| 65 74 50 6f 72 74 28 73 | 61 76 65 50 6f 72 74 29 |etPort(s|avePort)|
|00003460| 3b 0d 09 0d 09 72 65 74 | 75 72 6e 20 72 65 73 75 |;....ret|urn resu|
|00003470| 6c 74 3b 0d 7d 0d 0d 0d | 2f 2a 09 68 65 72 65 2c |lt;.}...|/*.here,|
|00003480| 20 77 65 20 73 65 65 20 | 77 68 69 63 68 20 70 61 | we see |which pa|
|00003490| 72 74 20 6f 66 20 74 68 | 65 20 73 63 72 6f 6c 6c |rt of th|e scroll|
|000034a0| 62 61 72 20 77 61 73 20 | 63 6c 69 63 6b 65 64 20 |bar was |clicked |
|000034b0| 69 6e 20 62 79 20 63 61 | 6c 6c 69 6e 67 20 66 69 |in by ca|lling fi|
|000034c0| 6e 64 63 6f 6e 74 72 6f | 6c 2e 20 20 74 72 61 63 |ndcontro|l. trac|
|000034d0| 6b 63 6f 6e 74 72 6f 6c | 0d 09 69 73 20 74 68 65 |kcontrol|..is the|
|000034e0| 6e 20 63 61 6c 6c 65 64 | 20 77 69 74 68 20 74 68 |n called| with th|
|000034f0| 65 20 61 70 70 72 6f 70 | 72 69 61 74 65 20 61 63 |e approp|riate ac|
|00003500| 74 69 6f 6e 20 70 72 6f | 63 20 69 66 20 69 6e 20 |tion pro|c if in |
|00003510| 6f 6e 65 20 6f 66 20 74 | 68 65 20 62 75 74 74 6f |one of t|he butto|
|00003520| 6e 73 20 6f 72 20 70 61 | 67 65 20 61 72 65 61 73 |ns or pa|ge areas|
|00003530| 2e 20 20 69 66 0d 09 69 | 6e 20 74 68 65 20 74 68 |. if..i|n the th|
|00003540| 75 6d 62 2c 20 74 68 65 | 20 74 65 78 74 20 69 73 |umb, the| text is|
|00003550| 20 73 69 6d 70 6c 79 20 | 72 65 2d 61 6c 69 67 6e | simply |re-align|
|00003560| 65 64 20 74 6f 20 74 68 | 65 20 6e 65 77 20 73 63 |ed to th|e new sc|
|00003570| 72 6f 6c 6c 62 61 72 20 | 70 6f 73 69 74 69 6f 6e |rollbar |position|
|00003580| 0d 2a 2f 0d 0d 76 6f 69 | 64 20 48 61 6e 64 6c 65 |.*/..voi|d Handle|
|00003590| 53 63 72 6f 6c 6c 65 72 | 28 44 69 61 6c 6f 67 50 |Scroller|(DialogP|
|000035a0| 74 72 20 74 68 65 44 69 | 61 6c 6f 67 2c 50 6f 69 |tr theDi|alog,Poi|
|000035b0| 6e 74 20 70 74 29 0d 7b | 0d 09 73 68 6f 72 74 20 |nt pt).{|..short |
|000035c0| 70 61 72 74 3b 0d 09 43 | 6f 6e 74 72 6f 6c 48 61 |part;..C|ontrolHa|
|000035d0| 6e 64 6c 65 20 74 68 65 | 43 6f 6e 74 72 6f 6c 3b |ndle the|Control;|
|000035e0| 0d 09 0d 09 70 61 72 74 | 20 3d 20 46 69 6e 64 43 |....part| = FindC|
|000035f0| 6f 6e 74 72 6f 6c 28 70 | 74 2c 74 68 65 44 69 61 |ontrol(p|t,theDia|
|00003600| 6c 6f 67 2c 26 74 68 65 | 43 6f 6e 74 72 6f 6c 29 |log,&the|Control)|
|00003610| 3b 0d 09 73 77 69 74 63 | 68 20 28 70 61 72 74 29 |;..switc|h (part)|
|00003620| 20 7b 0d 09 09 63 61 73 | 65 20 69 6e 55 70 42 75 | {...cas|e inUpBu|
|00003630| 74 74 6f 6e 3a 0d 09 09 | 63 61 73 65 20 69 6e 44 |tton:...|case inD|
|00003640| 6f 77 6e 42 75 74 74 6f | 6e 3a 0d 09 09 63 61 73 |ownButto|n:...cas|
|00003650| 65 20 69 6e 50 61 67 65 | 55 70 3a 0d 09 09 63 61 |e inPage|Up:...ca|
|00003660| 73 65 20 69 6e 50 61 67 | 65 44 6f 77 6e 3a 0d 09 |se inPag|eDown:..|
|00003670| 09 09 54 72 61 63 6b 43 | 6f 6e 74 72 6f 6c 28 74 |..TrackC|ontrol(t|
|00003680| 68 65 43 6f 6e 74 72 6f | 6c 2c 70 74 2c 53 63 72 |heContro|l,pt,Scr|
|00003690| 6f 6c 6c 42 61 72 41 63 | 74 69 6f 6e 29 3b 0d 09 |ollBarAc|tion);..|
|000036a0| 09 09 62 72 65 61 6b 3b | 0d 09 09 63 61 73 65 20 |..break;|...case |
|000036b0| 69 6e 54 68 75 6d 62 3a | 0d 09 09 09 54 72 61 63 |inThumb:|....Trac|
|000036c0| 6b 43 6f 6e 74 72 6f 6c | 28 74 68 65 43 6f 6e 74 |kControl|(theCont|
|000036d0| 72 6f 6c 2c 70 74 2c 6e | 69 6c 29 3b 0d 09 09 09 |rol,pt,n|il);....|
|000036e0| 52 65 41 6c 69 67 6e 54 | 65 78 74 54 6f 53 63 72 |ReAlignT|extToScr|
|000036f0| 6f 6c 6c 62 61 72 28 74 | 68 65 44 69 61 6c 6f 67 |ollbar(t|heDialog|
|00003700| 29 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 7d 0d |);....br|eak;..}.|
|00003710| 7d 0d 0d 0d 2f 2a 09 74 | 72 61 63 6b 63 6f 6e 74 |}.../*.t|rackcont|
|00003720| 72 6f 6c 20 63 61 6c 6c | 62 61 63 6b 20 75 73 65 |rol call|back use|
|00003730| 64 20 74 6f 20 64 65 74 | 65 72 6d 69 6e 65 20 77 |d to det|ermine w|
|00003740| 68 69 63 68 20 64 69 72 | 65 63 74 69 6f 6e 20 74 |hich dir|ection t|
|00003750| 6f 20 73 63 72 6f 6c 6c | 20 74 68 65 20 74 65 78 |o scroll| the tex|
|00003760| 74 2c 20 61 6e 64 20 62 | 79 20 68 6f 77 20 6d 75 |t, and b|y how mu|
|00003770| 63 68 2e 0d 09 6f 6e 63 | 65 20 74 68 69 73 20 69 |ch...onc|e this i|
|00003780| 73 20 6b 6e 6f 77 6e 2c | 20 74 68 65 20 74 65 78 |s known,| the tex|
|00003790| 74 20 69 73 20 73 63 72 | 6f 6c 6c 65 64 2c 20 61 |t is scr|olled, a|
|000037a0| 6e 64 20 74 68 65 20 73 | 63 72 6f 6c 6c 62 61 72 |nd the s|crollbar|
|000037b0| 20 61 64 6a 75 73 74 65 | 64 2e 0d 2a 2f 0d 0d 70 | adjuste|d..*/..p|
|000037c0| 61 73 63 61 6c 20 76 6f | 69 64 20 53 63 72 6f 6c |ascal vo|id Scrol|
|000037d0| 6c 42 61 72 41 63 74 69 | 6f 6e 28 43 6f 6e 74 72 |lBarActi|on(Contr|
|000037e0| 6f 6c 48 61 6e 64 6c 65 | 20 74 68 65 43 6f 6e 74 |olHandle| theCont|
|000037f0| 72 6f 6c 2c 73 68 6f 72 | 74 20 70 61 72 74 29 0d |rol,shor|t part).|
|00003800| 7b 0d 09 44 69 61 6c 6f | 67 50 74 72 20 74 68 65 |{..Dialo|gPtr the|
|00003810| 44 69 61 6c 6f 67 3b 0d | 09 73 68 6f 72 74 20 6c |Dialog;.|.short l|
|00003820| 69 6e 65 73 3b 0d 09 73 | 68 6f 72 74 20 63 74 6c |ines;..s|hort ctl|
|00003830| 56 61 6c 75 65 2c 63 74 | 6c 4d 61 78 2c 63 74 6c |Value,ct|lMax,ctl|
|00003840| 4d 69 6e 3b 0d 09 0d 09 | 63 74 6c 4d 61 78 20 3d |Min;....|ctlMax =|
|00003850| 20 47 65 74 43 74 6c 4d | 61 78 28 74 68 65 43 6f | GetCtlM|ax(theCo|
|00003860| 6e 74 72 6f 6c 29 3b 0d | 09 63 74 6c 4d 69 6e 20 |ntrol);.|.ctlMin |
|00003870| 3d 20 47 65 74 43 74 6c | 4d 69 6e 28 74 68 65 43 |= GetCtl|Min(theC|
|00003880| 6f 6e 74 72 6f 6c 29 3b | 0d 09 63 74 6c 56 61 6c |ontrol);|..ctlVal|
|00003890| 75 65 20 3d 20 47 65 74 | 43 74 6c 56 61 6c 75 65 |ue = Get|CtlValue|
|000038a0| 28 74 68 65 43 6f 6e 74 | 72 6f 6c 29 3b 0d 09 0d |(theCont|rol);...|
|000038b0| 09 74 68 65 44 69 61 6c | 6f 67 20 3d 20 28 2a 74 |.theDial|og = (*t|
|000038c0| 68 65 43 6f 6e 74 72 6f | 6c 29 2d 3e 63 6f 6e 74 |heContro|l)->cont|
|000038d0| 72 6c 4f 77 6e 65 72 3b | 0d 09 0d 09 73 77 69 74 |rlOwner;|....swit|
|000038e0| 63 68 20 28 70 61 72 74 | 29 20 7b 0d 09 09 63 61 |ch (part|) {...ca|
|000038f0| 73 65 20 69 6e 55 70 42 | 75 74 74 6f 6e 3a 0d 09 |se inUpB|utton:..|
|00003900| 09 09 6c 69 6e 65 73 20 | 3d 20 2d 31 3b 0d 09 09 |..lines |= -1;...|
|00003910| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 20 69 |.break;.|..case i|
|00003920| 6e 44 6f 77 6e 42 75 74 | 74 6f 6e 3a 0d 09 09 09 |nDownBut|ton:....|
|00003930| 6c 69 6e 65 73 20 3d 20 | 31 3b 0d 09 09 09 62 72 |lines = |1;....br|
|00003940| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 69 6e 50 61 |eak;...c|ase inPa|
|00003950| 67 65 55 70 3a 0d 09 09 | 09 6c 69 6e 65 73 20 3d |geUp:...|.lines =|
|00003960| 20 2d 6b 50 61 67 65 4c | 69 6e 65 73 3b 0d 09 09 | -kPageL|ines;...|
|00003970| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 20 69 |.break;.|..case i|
|00003980| 6e 50 61 67 65 44 6f 77 | 6e 3a 0d 09 09 09 6c 69 |nPageDow|n:....li|
|00003990| 6e 65 73 20 3d 20 6b 50 | 61 67 65 4c 69 6e 65 73 |nes = kP|ageLines|
|000039a0| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 64 65 |;....bre|ak;...de|
|000039b0| 66 61 75 6c 74 3a 0d 09 | 09 09 72 65 74 75 72 6e |fault:..|..return|
|000039c0| 3b 0d 09 7d 0d 0d 09 69 | 66 20 28 28 63 74 6c 56 |;..}...i|f ((ctlV|
|000039d0| 61 6c 75 65 2b 6c 69 6e | 65 73 29 3e 63 74 6c 4d |alue+lin|es)>ctlM|
|000039e0| 61 78 29 0d 09 09 6c 69 | 6e 65 73 20 3d 20 63 74 |ax)...li|nes = ct|
|000039f0| 6c 4d 61 78 2d 63 74 6c | 56 61 6c 75 65 3b 0d 09 |lMax-ctl|Value;..|
|00003a00| 69 66 20 28 28 63 74 6c | 56 61 6c 75 65 2b 6c 69 |if ((ctl|Value+li|
|00003a10| 6e 65 73 29 3c 63 74 6c | 4d 69 6e 29 0d 09 09 6c |nes)<ctl|Min)...l|
|00003a20| 69 6e 65 73 20 3d 20 63 | 74 6c 4d 69 6e 2d 63 74 |ines = c|tlMin-ct|
|00003a30| 6c 56 61 6c 75 65 3b 0d | 09 09 0d 09 69 66 20 28 |lValue;.|....if (|
|00003a40| 6c 69 6e 65 73 21 3d 30 | 29 20 7b 0d 09 09 53 63 |lines!=0|) {...Sc|
|00003a50| 72 6f 6c 6c 54 65 78 74 | 28 74 68 65 44 69 61 6c |rollText|(theDial|
|00003a60| 6f 67 2c 20 6c 69 6e 65 | 73 29 3b 0d 09 09 53 65 |og, line|s);...Se|
|00003a70| 74 43 74 6c 56 61 6c 75 | 65 28 74 68 65 43 6f 6e |tCtlValu|e(theCon|
|00003a80| 74 72 6f 6c 2c 63 74 6c | 56 61 6c 75 65 2b 6c 69 |trol,ctl|Value+li|
|00003a90| 6e 65 73 29 3b 0d 09 7d | 0d 7d 0d 0d 0d 2f 2a 09 |nes);..}|.}.../*.|
|00003aa0| 73 65 74 73 20 74 68 65 | 20 74 65 78 74 20 74 6f |sets the| text to|
|00003ab0| 70 20 6c 69 6e 65 20 74 | 6f 20 62 65 20 74 68 65 |p line t|o be the|
|00003ac0| 20 73 61 6d 65 20 61 73 | 20 74 68 65 20 63 75 72 | same as| the cur|
|00003ad0| 72 65 6e 74 20 73 63 72 | 6f 6c 6c 62 61 72 20 70 |rent scr|ollbar p|
|00003ae0| 6f 73 69 74 69 6f 6e 2e | 20 20 74 68 69 73 20 69 |osition.| this i|
|00003af0| 73 20 63 61 6c 6c 65 64 | 20 61 66 74 65 72 0d 09 |s called| after..|
|00003b00| 61 20 74 68 75 6d 62 20 | 6d 6f 76 65 6d 65 6e 74 |a thumb |movement|
|00003b10| 20 69 6e 20 74 68 65 20 | 73 63 72 6f 6c 6c 62 61 | in the |scrollba|
|00003b20| 72 2e 0d 2a 2f 0d 0d 76 | 6f 69 64 20 52 65 41 6c |r..*/..v|oid ReAl|
|00003b30| 69 67 6e 54 65 78 74 54 | 6f 53 63 72 6f 6c 6c 62 |ignTextT|oScrollb|
|00003b40| 61 72 28 44 69 61 6c 6f | 67 50 74 72 20 74 68 65 |ar(Dialo|gPtr the|
|00003b50| 44 69 61 6c 6f 67 29 0d | 7b 0d 09 43 6f 6e 74 72 |Dialog).|{..Contr|
|00003b60| 6f 6c 48 61 6e 64 6c 65 | 20 73 63 72 6f 6c 6c 42 |olHandle| scrollB|
|00003b70| 61 72 3b 0d 09 73 68 6f | 72 74 20 63 6f 6e 74 72 |ar;..sho|rt contr|
|00003b80| 6f 6c 53 63 72 6f 6c 6c | 50 6f 73 69 74 69 6f 6e |olScroll|Position|
|00003b90| 2c 74 65 78 74 53 63 72 | 6f 6c 6c 50 6f 73 69 74 |,textScr|ollPosit|
|00003ba0| 69 6f 6e 2c 73 63 72 6f | 6c 6c 44 65 6c 74 61 2c |ion,scro|llDelta,|
|00003bb0| 73 63 72 6f 6c 6c 50 69 | 78 3b 0d 09 0d 09 73 63 |scrollPi|x;....sc|
|00003bc0| 72 6f 6c 6c 42 61 72 20 | 3d 20 47 65 74 53 63 72 |rollBar |= GetScr|
|00003bd0| 6f 6c 6c 42 61 72 28 74 | 68 65 44 69 61 6c 6f 67 |ollBar(t|heDialog|
|00003be0| 29 3b 0d 09 0d 09 63 6f | 6e 74 72 6f 6c 53 63 72 |);....co|ntrolScr|
|00003bf0| 6f 6c 6c 50 6f 73 69 74 | 69 6f 6e 20 3d 20 47 65 |ollPosit|ion = Ge|
|00003c00| 74 43 74 6c 56 61 6c 75 | 65 28 73 63 72 6f 6c 6c |tCtlValu|e(scroll|
|00003c10| 42 61 72 29 3b 0d 09 74 | 65 78 74 53 63 72 6f 6c |Bar);..t|extScrol|
|00003c20| 6c 50 6f 73 69 74 69 6f | 6e 20 3d 20 28 28 2a 2a |lPositio|n = ((**|
|00003c30| 70 54 65 78 74 48 61 6e | 64 6c 65 29 2e 76 69 65 |pTextHan|dle).vie|
|00003c40| 77 52 65 63 74 2e 74 6f | 70 20 2d 20 28 2a 2a 70 |wRect.to|p - (**p|
|00003c50| 54 65 78 74 48 61 6e 64 | 6c 65 29 2e 64 65 73 74 |TextHand|le).dest|
|00003c60| 52 65 63 74 2e 74 6f 70 | 29 20 2f 20 28 2a 2a 70 |Rect.top|) / (**p|
|00003c70| 54 65 78 74 48 61 6e 64 | 6c 65 29 2e 6c 69 6e 65 |TextHand|le).line|
|00003c80| 48 65 69 67 68 74 3b 0d | 09 73 63 72 6f 6c 6c 44 |Height;.|.scrollD|
|00003c90| 65 6c 74 61 20 3d 20 74 | 65 78 74 53 63 72 6f 6c |elta = t|extScrol|
|00003ca0| 6c 50 6f 73 69 74 69 6f | 6e 20 2d 20 63 6f 6e 74 |lPositio|n - cont|
|00003cb0| 72 6f 6c 53 63 72 6f 6c | 6c 50 6f 73 69 74 69 6f |rolScrol|lPositio|
|00003cc0| 6e 3b 0d 09 73 63 72 6f | 6c 6c 50 69 78 20 3d 20 |n;..scro|llPix = |
|00003cd0| 73 63 72 6f 6c 6c 44 65 | 6c 74 61 20 2a 20 28 2a |scrollDe|lta * (*|
|00003ce0| 70 54 65 78 74 48 61 6e | 64 6c 65 29 2d 3e 6c 69 |pTextHan|dle)->li|
|00003cf0| 6e 65 48 65 69 67 68 74 | 3b 0d 09 54 45 53 63 72 |neHeight|;..TEScr|
|00003d00| 6f 6c 6c 28 30 2c 73 63 | 72 6f 6c 6c 50 69 78 2c |oll(0,sc|rollPix,|
|00003d10| 70 54 65 78 74 48 61 6e | 64 6c 65 29 3b 0d 7d 0d |pTextHan|dle);.}.|
|00003d20| 0d 0d 2f 2a 09 73 65 74 | 73 20 74 68 65 20 73 63 |../*.set|s the sc|
|00003d30| 72 6f 6c 6c 62 61 72 20 | 74 68 75 6d 62 20 74 6f |rollbar |thumb to|
|00003d40| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 74 65 78 | the cur|rent tex|
|00003d50| 74 20 70 6f 73 69 74 69 | 6f 6e 2e 20 20 74 68 69 |t positi|on. thi|
|00003d60| 73 20 69 73 20 63 61 6c | 6c 65 64 20 61 66 74 65 |s is cal|led afte|
|00003d70| 72 20 61 75 74 6f 73 63 | 72 6f 6c 6c 69 6e 67 2c |r autosc|rolling,|
|00003d80| 0d 09 77 68 69 63 68 20 | 6d 61 79 20 6f 63 63 75 |..which |may occu|
|00003d90| 72 20 61 66 74 65 72 20 | 61 20 63 61 6c 6c 20 74 |r after |a call t|
|00003da0| 6f 20 54 45 4b 65 79 2c | 20 6f 72 20 64 75 72 69 |o TEKey,| or duri|
|00003db0| 6e 67 20 61 20 64 72 61 | 67 2d 73 63 72 6f 6c 6c |ng a dra|g-scroll|
|00003dc0| 0d 2a 2f 0d 0d 76 6f 69 | 64 20 52 65 41 6c 69 67 |.*/..voi|d ReAlig|
|00003dd0| 6e 53 63 72 6f 6c 6c 62 | 61 72 54 6f 54 65 78 74 |nScrollb|arToText|
|00003de0| 28 44 69 61 6c 6f 67 50 | 74 72 20 74 68 65 44 69 |(DialogP|tr theDi|
|00003df0| 61 6c 6f 67 29 0d 7b 0d | 09 43 6f 6e 74 72 6f 6c |alog).{.|.Control|
|00003e00| 48 61 6e 64 6c 65 20 73 | 63 72 6f 6c 6c 42 61 72 |Handle s|crollBar|
|00003e10| 3b 0d 09 73 68 6f 72 74 | 20 74 65 78 74 53 63 72 |;..short| textScr|
|00003e20| 6f 6c 6c 50 6f 73 69 74 | 69 6f 6e 3b 0d 09 09 0d |ollPosit|ion;....|
|00003e30| 09 73 63 72 6f 6c 6c 42 | 61 72 20 3d 20 47 65 74 |.scrollB|ar = Get|
|00003e40| 53 63 72 6f 6c 6c 42 61 | 72 28 74 68 65 44 69 61 |ScrollBa|r(theDia|
|00003e50| 6c 6f 67 29 3b 0d 09 0d | 09 74 65 78 74 53 63 72 |log);...|.textScr|
|00003e60| 6f 6c 6c 50 6f 73 69 74 | 69 6f 6e 20 3d 20 28 28 |ollPosit|ion = ((|
|00003e70| 2a 2a 70 54 65 78 74 48 | 61 6e 64 6c 65 29 2e 76 |**pTextH|andle).v|
|00003e80| 69 65 77 52 65 63 74 2e | 74 6f 70 20 2d 20 28 2a |iewRect.|top - (*|
|00003e90| 2a 70 54 65 78 74 48 61 | 6e 64 6c 65 29 2e 64 65 |*pTextHa|ndle).de|
|00003ea0| 73 74 52 65 63 74 2e 74 | 6f 70 29 20 2f 20 28 2a |stRect.t|op) / (*|
|00003eb0| 2a 70 54 65 78 74 48 61 | 6e 64 6c 65 29 2e 6c 69 |*pTextHa|ndle).li|
|00003ec0| 6e 65 48 65 69 67 68 74 | 3b 0d 09 53 65 74 43 74 |neHeight|;..SetCt|
|00003ed0| 6c 56 61 6c 75 65 28 73 | 63 72 6f 6c 6c 42 61 72 |lValue(s|crollBar|
|00003ee0| 2c 74 65 78 74 53 63 72 | 6f 6c 6c 50 6f 73 69 74 |,textScr|ollPosit|
|00003ef0| 69 6f 6e 29 3b 0d 7d 0d | 0d 0d 2f 2a 09 73 63 72 |ion);.}.|../*.scr|
|00003f00| 6f 6c 6c 73 20 74 68 65 | 20 74 65 78 74 20 62 79 |olls the| text by|
|00003f10| 20 74 68 65 20 64 65 6c | 74 61 20 70 61 73 73 65 | the del|ta passe|
|00003f20| 64 20 69 6e 20 74 6f 20 | 74 68 65 20 66 75 6e 63 |d in to |the func|
|00003f30| 74 69 6f 6e 2e 20 20 63 | 61 6c 6c 65 64 20 69 6e |tion. c|alled in|
|00003f40| 20 72 65 73 70 6f 6e 73 | 65 20 74 6f 20 63 6c 69 | respons|e to cli|
|00003f50| 63 6b 69 6e 67 20 74 68 | 65 0d 09 61 72 72 6f 77 |cking th|e..arrow|
|00003f60| 73 20 6f 72 20 70 61 67 | 65 20 61 72 65 61 73 20 |s or pag|e areas |
|00003f70| 6f 66 20 74 68 65 20 73 | 63 72 6f 6c 6c 62 61 72 |of the s|crollbar|
|00003f80| 20 74 6f 20 6d 6f 76 65 | 20 74 68 65 20 74 65 78 | to move| the tex|
|00003f90| 74 0d 2a 2f 0d 0d 76 6f | 69 64 20 53 63 72 6f 6c |t.*/..vo|id Scrol|
|00003fa0| 6c 54 65 78 74 28 44 69 | 61 6c 6f 67 50 74 72 20 |lText(Di|alogPtr |
|00003fb0| 74 68 65 44 69 61 6c 6f | 67 2c 20 73 68 6f 72 74 |theDialo|g, short|
|00003fc0| 20 6c 69 6e 65 73 29 0d | 7b 0d 09 73 68 6f 72 74 | lines).|{..short|
|00003fd0| 20 73 63 72 6f 6c 6c 50 | 69 78 3b 0d 09 73 68 6f | scrollP|ix;..sho|
|00003fe0| 72 74 20 74 65 78 74 53 | 63 72 6f 6c 6c 50 6f 73 |rt textS|crollPos|
|00003ff0| 69 74 69 6f 6e 3b 0d 09 | 73 68 6f 72 74 20 74 68 |ition;..|short th|
|00004000| 65 4d 61 78 20 3d 20 47 | 65 74 43 74 6c 4d 61 78 |eMax = G|etCtlMax|
|00004010| 28 47 65 74 53 63 72 6f | 6c 6c 42 61 72 28 74 68 |(GetScro|llBar(th|
|00004020| 65 44 69 61 6c 6f 67 29 | 29 3b 0d 09 0d 09 74 65 |eDialog)|);....te|
|00004030| 78 74 53 63 72 6f 6c 6c | 50 6f 73 69 74 69 6f 6e |xtScroll|Position|
|00004040| 20 3d 20 28 28 2a 2a 70 | 54 65 78 74 48 61 6e 64 | = ((**p|TextHand|
|00004050| 6c 65 29 2e 76 69 65 77 | 52 65 63 74 2e 74 6f 70 |le).view|Rect.top|
|00004060| 20 2d 20 28 2a 2a 70 54 | 65 78 74 48 61 6e 64 6c | - (**pT|extHandl|
|00004070| 65 29 2e 64 65 73 74 52 | 65 63 74 2e 74 6f 70 29 |e).destR|ect.top)|
|00004080| 20 2f 20 28 2a 2a 70 54 | 65 78 74 48 61 6e 64 6c | / (**pT|extHandl|
|00004090| 65 29 2e 6c 69 6e 65 48 | 65 69 67 68 74 3b 0d 09 |e).lineH|eight;..|
|000040a0| 69 66 20 28 28 74 65 78 | 74 53 63 72 6f 6c 6c 50 |if ((tex|tScrollP|
|000040b0| 6f 73 69 74 69 6f 6e 2b | 6c 69 6e 65 73 29 3c 30 |osition+|lines)<0|
|000040c0| 29 0d 09 09 6c 69 6e 65 | 73 20 3d 20 2d 74 65 78 |)...line|s = -tex|
|000040d0| 74 53 63 72 6f 6c 6c 50 | 6f 73 69 74 69 6f 6e 3b |tScrollP|osition;|
|000040e0| 0d 09 69 66 20 28 28 74 | 65 78 74 53 63 72 6f 6c |..if ((t|extScrol|
|000040f0| 6c 50 6f 73 69 74 69 6f | 6e 2b 6c 69 6e 65 73 29 |lPositio|n+lines)|
|00004100| 3e 74 68 65 4d 61 78 29 | 0d 09 09 6c 69 6e 65 73 |>theMax)|...lines|
|00004110| 20 3d 20 74 68 65 4d 61 | 78 2d 74 65 78 74 53 63 | = theMa|x-textSc|
|00004120| 72 6f 6c 6c 50 6f 73 69 | 74 69 6f 6e 3b 0d 09 09 |rollPosi|tion;...|
|00004130| 09 09 0d 09 73 63 72 6f | 6c 6c 50 69 78 20 3d 20 |....scro|llPix = |
|00004140| 6c 69 6e 65 73 20 2a 20 | 28 2a 70 54 65 78 74 48 |lines * |(*pTextH|
|00004150| 61 6e 64 6c 65 29 2d 3e | 6c 69 6e 65 48 65 69 67 |andle)->|lineHeig|
|00004160| 68 74 3b 0d 09 0d 09 54 | 45 53 63 72 6f 6c 6c 28 |ht;....T|EScroll(|
|00004170| 30 2c 2d 73 63 72 6f 6c | 6c 50 69 78 2c 70 54 65 |0,-scrol|lPix,pTe|
|00004180| 78 74 48 61 6e 64 6c 65 | 29 3b 0d 7d 0d 0d 0d 2f |xtHandle|);.}.../|
|00004190| 2a 09 75 74 69 6c 69 74 | 79 20 70 72 6f 63 65 64 |*.utilit|y proced|
|000041a0| 75 72 65 20 74 6f 20 72 | 65 74 75 72 6e 20 61 20 |ure to r|eturn a |
|000041b0| 68 61 6e 64 6c 65 20 74 | 6f 20 74 68 65 20 73 63 |handle t|o the sc|
|000041c0| 72 6f 6c 6c 62 61 72 20 | 63 6f 6e 74 72 6f 6c 0d |rollbar |control.|
|000041d0| 2a 2f 0d 0d 43 6f 6e 74 | 72 6f 6c 48 61 6e 64 6c |*/..Cont|rolHandl|
|000041e0| 65 20 47 65 74 53 63 72 | 6f 6c 6c 42 61 72 28 44 |e GetScr|ollBar(D|
|000041f0| 69 61 6c 6f 67 50 74 72 | 20 74 68 65 44 69 61 6c |ialogPtr| theDial|
|00004200| 6f 67 29 0d 7b 0d 09 48 | 61 6e 64 6c 65 20 74 68 |og).{..H|andle th|
|00004210| 65 53 63 72 6f 6c 6c 65 | 72 3b 0d 09 73 68 6f 72 |eScrolle|r;..shor|
|00004220| 74 20 69 54 79 70 65 3b | 0d 09 52 65 63 74 20 69 |t iType;|..Rect i|
|00004230| 52 65 63 74 3b 0d 09 0d | 09 47 65 74 44 49 74 65 |Rect;...|.GetDIte|
|00004240| 6d 28 74 68 65 44 69 61 | 6c 6f 67 2c 6b 53 63 72 |m(theDia|log,kScr|
|00004250| 6f 6c 6c 65 72 49 74 65 | 6d 2c 26 69 54 79 70 65 |ollerIte|m,&iType|
|00004260| 2c 26 74 68 65 53 63 72 | 6f 6c 6c 65 72 2c 26 69 |,&theScr|oller,&i|
|00004270| 52 65 63 74 29 3b 0d 09 | 72 65 74 75 72 6e 20 28 |Rect);..|return (|
|00004280| 43 6f 6e 74 72 6f 6c 48 | 61 6e 64 6c 65 29 74 68 |ControlH|andle)th|
|00004290| 65 53 63 72 6f 6c 6c 65 | 72 3b 0d 7d 0d 00 00 00 |eScrolle|r;.}....|
|000042a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004300| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00004310| 00 00 00 c3 00 00 00 00 | 00 03 f0 00 00 00 0c 3c |........|.......<|
|00004320| 00 00 00 c3 00 00 00 00 | 00 0f fc 00 00 00 0c 3c |........|.......<|
|00004330| 0b 50 44 44 69 61 6c 6f | 67 73 2e 63 02 00 00 00 |.PDDialo|gs.c....|
|00004340| 54 45 58 54 4d 50 53 20 | 01 00 ff ff ff ff 00 00 |TEXTMPS |........|
|00004350| 00 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|00004360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004370| 00 00 ab d5 41 80 00 00 | 42 1d 00 00 01 ac 0c 3c |....A...|B......<|
|00004380| 00 00 00 c3 00 00 00 0d | 11 11 2c 00 00 00 0c 3c |........|..,....<|
|00004390| 00 00 00 c3 00 00 00 0c | 44 44 6c 00 00 00 0c 3c |........|DDl....<|
|000043a0| 00 00 00 c3 00 00 00 0d | 11 11 2c 00 00 00 0c 3c |........|..,....<|
|000043b0| 00 00 00 c3 00 00 00 0c | 44 44 6c 00 00 00 0c 3c |........|DDl....<|
|000043c0| 00 00 00 c3 00 00 00 0f | ff ff fc 00 00 00 0c 3c |........|.......<|
|000043d0| 00 00 00 c3 00 00 00 00 | 00 00 00 00 00 00 0c 3c |........|.......<|
|000043e0| 00 00 00 c3 00 00 00 00 | 00 00 00 00 00 00 0c 3c |........|.......<|
|000043f0| 00 00 00 c3 03 f3 03 0f | 30 c3 c3 0c 3c 3f 0c 3c |........|0...<?.<|
|00004400| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 32 35 35 |...H..Mo|naco.255|
|00004410| 01 02 df e0 6d 20 66 69 | 6c 65 4e 61 6d 65 2c 20 |....m fi|leName, |
|00004420| 73 68 6f 72 74 20 00 06 | 00 04 00 2a 00 1c 02 61 |short ..|...*...a|
|00004430| 02 18 00 2a 00 20 01 d1 | 02 50 ac 43 09 be 00 00 |...*. ..|.P.C....|
|00004440| 0b 55 00 00 0b 55 00 00 | 09 7f 01 00 00 00 00 1e |.U...U..|........|
|00004450| 00 2a 00 1c 02 61 02 18 | 00 2a 00 20 01 d1 02 50 |.*...a..|.*. ...P|
|00004460| 00 00 09 7f 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004470| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 e6 |.....n..|.n...>..|
|00004480| 06 48 22 28 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |.H"(....|.>..MPSR|
|00004490| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|000044a0| 03 f0 ff ff 00 00 00 4c | 00 f0 b9 68 00 00 00 00 |.......L|...h....|
|000044b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+